]> git.sur5r.net Git - openldap/commitdiff
ITS#5230
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 15 Nov 2007 01:37:15 +0000 (01:37 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 15 Nov 2007 01:37:15 +0000 (01:37 +0000)
CHANGES
servers/slapd/limits.c

diff --git a/CHANGES b/CHANGES
index 348a9491ee0d4feee121ce4a1a85354484006ef3..bd6790295ad88805d1e453c61ca06d84df7b2c6c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,7 @@ OpenLDAP 2.4.7 Engineering
        Fixed slapd filter normalization (ITS#5212)
        Fixed slapd multiple sufix checking (ITS#5186)
        Fixed slapd contextCSN updating from old releases (ITS#5225)
+       Fixed slapd paged results handling when using rootdn (ITS#5230)
        Fixed slapo-ppolicy single password check on modify (ITS#5146)
        Fixed slapo-syncprov refresh and persist cookie sending (ITS#5210)
        Fixed slapo-syncprov ignore invalid cookies (ITS#5211)
index 81f4027de36dceb52a2510dfacb0c4da98b6b0ed..5fbda3008c67ebcc3c519d84e7f507036913121d 100644 (file)
@@ -1118,6 +1118,18 @@ limits_check( Operation *op, SlapReply *rs )
                        op->ors_slimit = SLAP_NO_LIMIT;
                }
 
+               /* if paged results and slimit are requested */ 
+               if ( get_pagedresults( op ) > SLAP_CONTROL_IGNORED &&
+                       op->ors_slimit != SLAP_NO_LIMIT ) {
+                       PagedResultsState *ps = op->o_pagedresults_state;
+                       int total = op->ors_slimit - ps->ps_count;
+                       if ( total > 0 ) {
+                               op->ors_slimit = total;
+                       } else {
+                               op->ors_slimit = 0;
+                       }
+               }
+
        /* if not root, get appropriate limits */
        } else {
                ( void ) limits_get( op, &op->o_ndn, &op->ors_limit );