From: Pierangelo Masarati Date: Thu, 12 Jan 2006 22:48:02 +0000 (+0000) Subject: make sure appropriate limits are in place (ITS#4336) X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~332 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7124ec615efcd6419db99d6f093b61607fa84934;p=openldap make sure appropriate limits are in place (ITS#4336) --- diff --git a/servers/slapd/back-ldap/chain.c b/servers/slapd/back-ldap/chain.c index 6a6ec89ec7..64f5bb5fc3 100644 --- a/servers/slapd/back-ldap/chain.c +++ b/servers/slapd/back-ldap/chain.c @@ -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;