]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbcacls: Ensure we read a hex number as %x, not %u.
authorJeremy Allison <jra@samba.org>
Fri, 22 May 2015 07:24:56 +0000 (09:24 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 1 Jun 2015 21:46:18 +0000 (23:46 +0200)
Based on a patch from Zoe O'Connell <zoe@metail.com>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11068

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
source3/utils/smbcacls.c

index 23a1192f789241d186871caf22298b0497c9857e..d8e7985bd0c7162e7b92da9b0474bfaaeb9cf242 100644 (file)
@@ -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);