]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/search.c
Experiment with busy loop protection...
[openldap] / servers / slapd / search.c
index 30b8136d299f195cd673fc859c4490f903df710e..63379e60b6a5d1c97ecc97773712fc02c779960f 100644 (file)
@@ -202,33 +202,12 @@ do_search(
                Entry *entry = NULL;
 
                if ( strcasecmp( nbase, LDAP_ROOT_DSE ) == 0 ) {
-                       /* check restrictions */
-                       rc = backend_check_restrictions( NULL, conn, op, NULL, &text ) ;
-                       if( rc != LDAP_SUCCESS ) {
-                               send_ldap_result( conn, op, rc,
-                                       NULL, text, NULL, NULL );
+#ifdef LDAP_CONNECTIONLESS
+                       /* Ignore LDAPv2 CLDAP DSE queries */
+                       if (op->o_protocol==LDAP_VERSION2 && conn->c_is_udp) {
                                goto return_results;
                        }
-
-                       rc = root_dse_info( conn, &entry, &text );
-               }
-
-#if defined( SLAPD_MONITOR_DN )
-               else if ( strcasecmp( nbase, SLAPD_MONITOR_DN ) == 0 ) {
-                       /* check restrictions */
-                       rc = backend_check_restrictions( NULL, conn, op, NULL, &text ) ;
-                       if( rc != LDAP_SUCCESS ) {
-                               send_ldap_result( conn, op, rc,
-                                       NULL, text, NULL, NULL );
-                               goto return_results;
-                       }
-
-                       rc = monitor_info( &entry, &text );
-               }
 #endif
-
-#if defined( SLAPD_CONFIG_DN )
-               else if ( strcasecmp( nbase, SLAPD_CONFIG_DN ) == 0 ) {
                        /* check restrictions */
                        rc = backend_check_restrictions( NULL, conn, op, NULL, &text ) ;
                        if( rc != LDAP_SUCCESS ) {
@@ -237,9 +216,8 @@ do_search(
                                goto return_results;
                        }
 
-                       rc = config_info( &entry, &text );
+                       rc = root_dse_info( conn, &entry, &text );
                }
-#endif
 
 #if defined( SLAPD_SCHEMA_DN )
                else if ( strcasecmp( nbase, SLAPD_SCHEMA_DN ) == 0 ) {