From: Kurt Zeilenga Date: Fri, 6 Nov 1998 03:07:03 +0000 (+0000) Subject: merge in passwd backend search sizelimit bugfix from -devel X-Git-Tag: OPENLDAP_REL_ENG_1_0_3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6c4aaa18f7b6acec7f4ad7ab3e8698ab58087c1;p=thirdparty%2Fopenldap.git merge in passwd backend search sizelimit bugfix from -devel --- diff --git a/servers/slapd/back-passwd/search.c b/servers/slapd/back-passwd/search.c index 11c1d8e719..3453c1ff95 100644 --- a/servers/slapd/back-passwd/search.c +++ b/servers/slapd/back-passwd/search.c @@ -80,14 +80,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 ); @@ -103,6 +95,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 ); }