mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Move sizelimit check such that it limits what's returned, not what is searched.
This commit is contained in:
parent
48e53c8487
commit
d81b77e52d
1 changed files with 8 additions and 8 deletions
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue