]> git.sur5r.net Git - openldap/commitdiff
make sure appropriate limits are in place (ITS#4336)
authorPierangelo Masarati <ando@openldap.org>
Thu, 12 Jan 2006 22:48:02 +0000 (22:48 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 12 Jan 2006 22:48:02 +0000 (22:48 +0000)
servers/slapd/back-ldap/chain.c

index 6a6ec89ec7a06c367e33c8aa0c0e8038eb83a6a4..64f5bb5fc38adfb3423bfab39b0eb6a180a87f78 100644 (file)
@@ -748,7 +748,16 @@ cleanup:;
                        }
                        
                } else {
-                       rc = ldap_chain_op( op, rs, lback->bi_op_search, ref );
+                       /* we might get here before any database actually 
+                        * performed a search; in those cases, we need
+                        * to check limits, to make sure safe defaults
+                        * are in place */
+                       if ( op->ors_limit != NULL || limits_check( op, rs ) == 0 ) {
+                               rc = ldap_chain_op( op, rs, lback->bi_op_search, ref );
+
+                       } else {
+                               rc = SLAP_CB_CONTINUE;
+                       }
                }
                break;