summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-03-05 00:03:12 +0300
committerMatthieu Patou <mat@samba.org>2011-03-20 11:27:25 +0100
commitd4c78b66c275700fe7c75180b7febe33eba15e93 (patch)
treefc2f25326edce6ffb98de64720182eb4475ab552 /source4/lib/ldb
parentd772b8e78006755444d14dc7a4efbdcdb8e0db47 (diff)
downloadsamba-d4c78b66c275700fe7c75180b7febe33eba15e93.tar.gz
samba-d4c78b66c275700fe7c75180b7febe33eba15e93.tar.bz2
samba-d4c78b66c275700fe7c75180b7febe33eba15e93.zip
ldb:fix control parsing for dirsync
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_controls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb_controls.c b/source4/lib/ldb/common/ldb_controls.c
index 5a86bde211..5048b6deac 100644
--- a/source4/lib/ldb/common/ldb_controls.c
+++ b/source4/lib/ldb/common/ldb_controls.c
@@ -465,11 +465,12 @@ struct ldb_control *ldb_parse_control_from_string(struct ldb_context *ldb, TALLO
struct ldb_dirsync_control *control;
const char *p;
char cookie[1024];
- int crit, flags, max_attrs, ret;
+ int crit, max_attrs, ret;
+ uint32_t flags;
cookie[0] = '\0';
p = &(control_strings[sizeof(LDB_CONTROL_DIRSYNC_NAME)]);
- ret = sscanf(p, "%d:%d:%d:%1023[^$]", &crit, &flags, &max_attrs, cookie);
+ ret = sscanf(p, "%d:%u:%d:%1023[^$]", &crit, &flags, &max_attrs, cookie);
if ((ret < 3) || (crit < 0) || (crit > 1) || (flags < 0) || (max_attrs < 0)) {
error_string = talloc_asprintf(mem_ctx, "invalid dirsync control syntax\n");