From: Pierangelo Masarati Date: Sat, 12 Jun 2004 17:31:45 +0000 (+0000) Subject: clean up search limits enforcement X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~278 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0c49718e8255276f9fe6ab489961fa12dd9c1d69;p=openldap clean up search limits enforcement --- diff --git a/servers/slapd/search.c b/servers/slapd/search.c index a22314a6a6..7f79cf6773 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -401,8 +401,12 @@ do_search( #endif /* LDAP_SLAPI */ /* actually do the search and send the result(s) */ - if ( op->o_bd->be_search && limits_check( op, rs ) == 0 ) { - (op->o_bd->be_search)( op, rs ); + if ( op->o_bd->be_search ) { + if ( limits_check( op, rs ) == 0 ) { + (op->o_bd->be_search)( op, rs ); + } + /* else limits_check() sends error */ + } else { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, "operation not supported within namingContext" );