]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backend.c
Add multimaster replication support (ITS#170) based upon
[openldap] / servers / slapd / backend.c
index 7b143a08e01965394f1479f583ae012293cb84a6..c8d30afd066efce744304c112c6d58a149fb9c74 100644 (file)
@@ -13,6 +13,8 @@
 #include "slap.h"
 #include "lutil.h"
 
+#include "ldap_defaults.h"
+
 #ifdef SLAPD_LDAP
 #include "back-ldap/external.h"
 #endif
@@ -437,26 +439,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
@@ -615,3 +597,22 @@ backend_group(
        else
                return(1);
 }
+
+#ifdef SLAPD_SCHEMA_DN
+Attribute *backend_subschemasubentry( Backend *be )
+{
+       /* should be backend specific */
+       static struct berval ss_val = {
+               sizeof(SLAPD_SCHEMA_DN)-1,
+               SLAPD_SCHEMA_DN };
+       static struct berval *ss_vals[2] = { &ss_val, NULL };
+       static Attribute ss_attr = {
+               "subschemasubentry",
+               ss_vals,
+               SYNTAX_DN | SYNTAX_CIS,
+               NULL
+       };
+
+       return &ss_attr;
+}
+#endif