X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fsearch.c;h=a24a9f68ee60fb9c76061a72b762bb0575171710;hb=18393e882cd89e461fc804b8ef58817027e465a1;hp=92a34841bf0914a9578c09fa80dd097a72a367a6;hpb=059ee8c86d7da6acad0b59e66a7e238dfbdd5b21;p=openldap diff --git a/servers/slapd/search.c b/servers/slapd/search.c index 92a34841bf..a24a9f68ee 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -105,7 +105,12 @@ do_search( goto return_results; } - (void) dn_normalize_case( base ); + if( dn_normalize_case( base ) == NULL ) { + send_ldap_result( conn, op, LDAP_INVALID_DN_SYNTAX, + NULL, "invalid DN", NULL, NULL ); + rc = -1; + goto return_results; + } Debug( LDAP_DEBUG_ARGS, "SRCH \"%s\" %d %d", base, scope, deref ); Debug( LDAP_DEBUG_ARGS, " %d %d %d\n", sizelimit, timelimit, @@ -158,14 +163,14 @@ do_search( if ( scope == LDAP_SCOPE_BASE ) { #if defined( SLAPD_MONITOR_DN ) if ( strcmp( base, SLAPD_MONITOR_DN ) == 0 ) { - monitor_info( conn, op ); + monitor_info( conn, op, attrs, attrsonly ); goto return_results; } #endif #if defined( SLAPD_CONFIG_DN ) if ( strcmp( base, SLAPD_CONFIG_DN ) == 0 ) { - config_info( conn, op ); + config_info( conn, op, attrs, attrsonly ); goto return_results; } #endif @@ -195,6 +200,9 @@ do_search( goto return_results; } + /* deref the base if needed */ + base = suffix_alias( be, base ); + /* actually do the search and send the result(s) */ if ( be->be_search ) { (*be->be_search)( be, conn, op, base, scope, deref, sizelimit,