summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/ranged_results.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-09 20:06:54 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-09 20:06:54 +0100
commitec106a14216ee034b7e04c177c89703e63dfd107 (patch)
tree59c56cd663ee3dc03d0ce63bf4405ee87c14834a /source4/dsdb/samdb/ldb_modules/ranged_results.c
parent4075a2ba982ea56ff925e0a33839f0760fd71911 (diff)
parent1a2544a24c064e9eecb973439ccd0e7126e06e77 (diff)
downloadsamba-ec106a14216ee034b7e04c177c89703e63dfd107.tar.gz
samba-ec106a14216ee034b7e04c177c89703e63dfd107.tar.bz2
samba-ec106a14216ee034b7e04c177c89703e63dfd107.zip
Merge branch 'v4-0-trivial' into v4-0-python
(This used to be commit b874f07175ae38a041f53f0e4ac6a4050dcefeae)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/ranged_results.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/ranged_results.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/ranged_results.c b/source4/dsdb/samdb/ldb_modules/ranged_results.c
index 345b8b8440..c527afc6db 100644
--- a/source4/dsdb/samdb/ldb_modules/ranged_results.c
+++ b/source4/dsdb/samdb/ldb_modules/ranged_results.c
@@ -153,8 +153,10 @@ static int rr_search(struct ldb_module *module, struct ldb_request *req)
if (strncasecmp(p, ";range=", strlen(";range=")) != 0) {
continue;
}
- if (sscanf(p, ";range=%u-*", &start) == 1) {
- } else if (sscanf(p, ";range=%u-%u", &start, &end) != 2) {
+ if (sscanf(p, ";range=%u-%u", &start, &end) == 2) {
+ } else if (sscanf(p, ";range=%u-*", &start) == 1) {
+ end = (unsigned int)-1;
+ } else {
ldb_asprintf_errstring(module->ldb, "range request error: range requst malformed");
return LDB_ERR_UNWILLING_TO_PERFORM;
}