From 7124ec615efcd6419db99d6f093b61607fa84934 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 12 Jan 2006 22:48:02 +0000 Subject: [PATCH] make sure appropriate limits are in place (ITS#4336) --- servers/slapd/back-ldap/chain.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; -- 2.39.5