[Pkg-samba-maint] [samba] 98/135: s3-utils: Fix scanf format in smbacls.
Ivo De Decker
ivodd at moszumanska.debian.org
Sat Jan 11 21:30:29 UTC 2014
This is an automated email from the git hooks/post-receive script.
ivodd pushed a commit to branch master
in repository samba.
commit 25ba5fb7ee93f6a4616b740f7a437d1b36d4ead1
Author: Andreas Schneider <asn at samba.org>
Date: Fri Nov 15 17:02:14 2013 +0100
s3-utils: Fix scanf format in smbacls.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 4c98b9ce8f8de5883796aa38f1193e04a0ee4e58)
---
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 3ee7034..bb02aa0 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -490,7 +490,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;
}
@@ -553,7 +553,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);
@@ -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, "%i", &amask) != 1) {
+ if (sscanf(tok, "%u", &amask) != 1) {
printf("ACE '%s': bad hex number at '%s'\n",
orig_str, tok);
SAFE_FREE(str);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list