]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
merge in passwd backend search sizelimit bugfix from -devel OPENLDAP_REL_ENG_1_0_3
authorKurt Zeilenga <kurt@openldap.org>
Fri, 6 Nov 1998 03:07:03 +0000 (03:07 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 6 Nov 1998 03:07:03 +0000 (03:07 +0000)
servers/slapd/back-passwd/search.c

index 11c1d8e7192424712a5acd60e0e9f6592fc0a722..3453c1ff9529ac55b9e10134dd2105eb3009a0eb 100644 (file)
@@ -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( &currenttime_mutex );
                time( &currenttime );
@@ -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 );
                }