s3: lib: util: Ensure we read a hex number as %x, not %u.
authorJeremy Allison <jra@samba.org>
Thu, 21 May 2015 10:35:43 +0000 (12:35 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 21 May 2015 13:34:59 +0000 (15:34 +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>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 21 15:34:59 CEST 2015 on sn-devel-104

source3/lib/util_sd.c

index bfd5dbb979a760e7f6d7d29a853885f169a334fd..8065a0fbd1a4e6f9a27a80627a81afe928deb830 100644 (file)
@@ -501,7 +501,7 @@ 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);