From: Jeremy Allison Date: Fri, 22 May 2015 07:24:56 +0000 (+0200) Subject: s3: smbcacls: Ensure we read a hex number as %x, not %u. X-Git-Tag: samba-4.1.19~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db283914bcfa38661f18ac89712c1e9eb949095b;p=thirdparty%2Fsamba.git s3: smbcacls: Ensure we read a hex number as %x, not %u. Based on a patch from Zoe O'Connell BUG: https://bugzilla.samba.org/show_bug.cgi?id=11068 Signed-off-by: Jeremy Allison Reviewed-by: Jim McDonough --- diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 23a1192f789..d8e7985bd0c 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -571,7 +571,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace, } if (strncmp(tok, "0x", 2) == 0) { - if (sscanf(tok, "%u", &amask) != 1) { + if (sscanf(tok, "%x", &amask) != 1) { printf("ACE '%s': bad hex number at '%s'\n", orig_str, tok); SAFE_FREE(str);