]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backend.c
fix substring_comp_candidates logic if intersection of candidates
[openldap] / servers / slapd / backend.c
index 5b5a1f5db822bd99866ab50a86b9ac3777a34059..3b5b51fe77898d4efd32be601ed969918dfba6cf 100644 (file)
@@ -385,6 +385,9 @@ backend_db_init(
        be->be_sizelimit = defsize;
        be->be_timelimit = deftime;
 
+       be->be_realm = global_realm != NULL
+               ? ch_strdup( global_realm ) : NULL;
+
        if(bi->bi_db_init) {
                rc = bi->bi_db_init( be );
        }
@@ -434,26 +437,6 @@ select_backend( char * dn )
                }
        }
 
-        /* if no proper suffix could be found then check for aliases */
-        for ( i = 0; i < nbackends; i++ ) {
-                for ( j = 0; 
-                     backends[i].be_suffixAlias != NULL && 
-                      backends[i].be_suffixAlias[j] != NULL; 
-                     j += 2 )
-                {
-                        len = strlen( backends[i].be_suffixAlias[j] );
-
-                        if ( len > dnlen ) {
-                                continue;
-                        }
-
-                        if ( strcmp( backends[i].be_suffixAlias[j],
-                            dn + (dnlen - len) ) == 0 ) {
-                                return( &backends[i] );
-                        }
-                }
-        }
-
 #ifdef LDAP_ALLOW_NULL_SEARCH_BASE
        /* Add greg@greg.rim.or.jp
         * It's quick hack for cheap client
@@ -596,7 +579,6 @@ backend_connection_destroy(
        return 0;
 }
 
-#ifdef SLAPD_ACLGROUPS
 int 
 backend_group(
        Backend *be,
@@ -613,4 +595,3 @@ backend_group(
        else
                return(1);
 }
-#endif