[Pkg-samba-maint] [samba] 99/135: s3-utils: Fix scanf format in sharesec.
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 41fc4a45ee0845e1bd8b7e67b23e023d4a961a8a
Author: Andreas Schneider <asn at samba.org>
Date: Fri Nov 15 17:02:15 2013 +0100
s3-utils: Fix scanf format in sharesec.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 278899f5a763af7e7603f05f07048b7d8d4e9972)
---
source3/utils/sharesec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c
index 38c11e0..2b1e435 100644
--- a/source3/utils/sharesec.c
+++ b/source3/utils/sharesec.c
@@ -186,7 +186,7 @@ static bool parse_ace(struct security_ace *ace, const char *orig_str)
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 &&
string_to_sid(&sid, str)) {
goto done;
}
@@ -226,7 +226,7 @@ static bool parse_ace(struct security_ace *ace, const char *orig_str)
/* no flags on share permissions */
if (!(next_token_talloc(frame, &cp, &tok, "/") &&
- sscanf(tok, "%i", &aflags) && aflags == 0)) {
+ sscanf(tok, "%u", &aflags) && aflags == 0)) {
fprintf(stderr, "ACE '%s': bad integer flags entry at '%s'\n",
orig_str, tok);
SAFE_FREE(str);
@@ -243,7 +243,7 @@ static bool parse_ace(struct security_ace *ace, const char *orig_str)
}
if (strncmp(tok, "0x", 2) == 0) {
- if (sscanf(tok, "%i", &amask) != 1) {
+ if (sscanf(tok, "%u", &amask) != 1) {
fprintf(stderr, "ACE '%s': bad hex number at '%s'\n",
orig_str, tok);
TALLOC_FREE(frame);
--
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