X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fbackend.c;h=0c07a87a9bba3b0526c340a9fd96c1cb1216a67d;hb=6147119dc8526a758a7c576940fe8483e2b93915;hp=74cc285665f02cc831d39a6de604d08c924520a0;hpb=b7bbc7504d14e2d1c18f5e9392f644d94bf91f08;p=openldap diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 74cc285665..0c07a87a9b 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -1,3 +1,7 @@ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* backend.c - routines for dealing with back-end databases */ @@ -13,6 +17,8 @@ #include "slap.h" #include "lutil.h" +#include "ldap_defaults.h" + #ifdef SLAPD_LDAP #include "back-ldap/external.h" #endif @@ -437,26 +443,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 @@ -599,7 +585,6 @@ backend_connection_destroy( return 0; } -#ifdef SLAPD_ACLGROUPS int backend_group( Backend *be, @@ -616,4 +601,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