From: Kurt Zeilenga Date: Mon, 26 Oct 1998 03:33:30 +0000 (+0000) Subject: Move sizelimit check such that it limits what's returned, not what is searched. X-Git-Tag: PHP3_TOOL_0_0~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d81b77e52d29a968f5ac68a9b059fc3a0bee3298;p=openldap Move sizelimit check such that it limits what's returned, not what is searched. --- diff --git a/servers/slapd/back-passwd/search.c b/servers/slapd/back-passwd/search.c index 7c32656ec2..942b804a6c 100644 --- a/servers/slapd/back-passwd/search.c +++ b/servers/slapd/back-passwd/search.c @@ -83,14 +83,6 @@ passwd_back_search( } pthread_mutex_unlock( &op->o_abandonmutex ); - /* check size limit */ - if ( --slimit == -1 ) { - send_ldap_result( conn, op, LDAP_SIZELIMIT_EXCEEDED, - NULL, NULL ); - endpwent(); - return( 0 ); - } - /* check time limit */ pthread_mutex_lock( ¤ttime_mutex ); time( ¤ttime ); @@ -106,6 +98,14 @@ passwd_back_search( e = pw2entry( be, pw ); if ( test_filter( be, conn, op, e, filter ) == 0 ) { + /* check size limit */ + if ( --slimit == -1 ) { + send_ldap_result( conn, op, LDAP_SIZELIMIT_EXCEEDED, + NULL, NULL ); + endpwent(); + return( 0 ); + } + send_search_entry( be, conn, op, e, attrs, attrsonly ); }