From 4c98b9ce8f8de5883796aa38f1193e04a0ee4e58 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 15 Nov 2013 17:02:14 +0100 Subject: [PATCH] s3-utils: Fix scanf format in smbacls. Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- source3/utils/smbcacls.c | 6 +++--- 1 file 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); -- 2.11.4.GIT