X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fsearch.c;h=fada8cb8cdec9f3bebfc1fe3831aade9efb4693a;hb=9ba829436e33d42f918f377a7b636869f7a9c371;hp=7e36a3d7483b3b0ddf990689eca751577ac6d692;hpb=6107ba67d2fd7eadb23ffdd1d284306011ef4013;p=openldap diff --git a/servers/slapd/search.c b/servers/slapd/search.c index 7e36a3d748..fada8cb8cd 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -142,14 +142,12 @@ do_search( send_ldap_disconnect( conn, op, LDAP_PROTOCOL_ERROR, text ); } else { - send_ldap_result( conn, op, rc, - NULL, text, NULL, NULL ); + send_ldap_result( conn, op, rc, + NULL, text, NULL, NULL ); } goto return_results; - - } else { - filter2bv( filter, &fstr ); } + filter2bv( filter, &fstr ); #ifdef NEW_LOGGING LDAP_LOG( OPERATION, ARGS, @@ -239,7 +237,7 @@ do_search( } #if defined( SLAPD_SCHEMA_DN ) - else if ( strcasecmp( nbase.bv_val, SLAPD_SCHEMA_DN ) == 0 ) { + else if ( bvmatch( &nbase, &global_schemandn ) ) { /* check restrictions */ rc = backend_check_restrictions( NULL, conn, op, NULL, &text ) ; if( rc != LDAP_SUCCESS ) { @@ -319,7 +317,7 @@ do_search( if ( be->be_search ) { (*be->be_search)( be, conn, op, &pbase, &nbase, scope, deref, sizelimit, - timelimit, filter, &fstr, an, attrsonly ); + timelimit, filter, &fstr, an, attrsonly ); } else { send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM, NULL, "operation not supported within namingContext",