summaryrefslogtreecommitdiff
path: root/source3/utils/smbcacls.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-11-15 17:02:14 +0100
committerJeremy Allison <jra@samba.org>2013-11-15 11:07:43 -0800
commit4c98b9ce8f8de5883796aa38f1193e04a0ee4e58 (patch)
tree41e5adb33227e2e957a5cd0a4d60de128549610c /source3/utils/smbcacls.c
parent69b3a0cb3f2736e98c20dabb43c201af0c004f67 (diff)
downloadsamba-4c98b9ce8f8de5883796aa38f1193e04a0ee4e58.tar.gz
s3-utils: Fix scanf format in smbacls.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/utils/smbcacls.c')
-rw-r--r--source3/utils/smbcacls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 20ce73ddc71..11b7388303c 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -489,7 +489,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
p++;
/* Try to parse numeric form */
- if (sscanf(p, "%i/%i/%i", &atype, &aflags, &amask) == 3 &&
+ if (sscanf(p, "%u/%u/%u", &atype, &aflags, &amask) == 3 &&
StringToSid(cli, &sid, str)) {
goto done;
}
@@ -552,7 +552,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
return False;
}
} else {
- if (!sscanf(tok, "%i", &aflags)) {
+ if (!sscanf(tok, "%u", &aflags)) {
printf("ACE '%s': bad integer flags entry at '%s'\n",
orig_str, tok);
SAFE_FREE(str);
@@ -570,7 +570,7 @@ static bool parse_ace(struct cli_state *cli, struct security_ace *ace,
}
if (strncmp(tok, "0x", 2) == 0) {
- if (sscanf(tok, "%i", &amask) != 1) {
+ if (sscanf(tok, "%u", &amask) != 1) {
printf("ACE '%s': bad hex number at '%s'\n",
orig_str, tok);
SAFE_FREE(str);