--- servers/slapd/root_dse.c 2004/10/01 05:33:17 1.94 +++ servers/slapd/root_dse.c 2005/03/14 22:33:12 1.95.2.3 @@ -1,8 +1,8 @@ /* root_dse.c - Provides the Root DSA-Specific Entry */ -/* $OpenLDAP: pkg/ldap/servers/slapd/root_dse.c,v 1.93 2004/09/04 02:54:30 kurt Exp $ */ +/* $OpenLDAP: pkg/ldap/servers/slapd/root_dse.c,v 1.100 2005/03/14 22:21:00 hyc Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1999-2004 The OpenLDAP Foundation. + * Copyright 1999-2005 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,9 +34,10 @@ static struct berval supportedFeatures[] BER_BVC(LDAP_FEATURE_ABSOLUTE_FILTERS), /* (&) and (|) search filters */ BER_BVC(LDAP_FEATURE_LANGUAGE_TAG_OPTIONS), /* Language Tag Options */ BER_BVC(LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS),/* Language Range Options */ - -#ifdef LDAP_DEVEL +#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE BER_BVC(LDAP_FEATURE_SUBORDINATE_SCOPE), /* "children" search scope */ +#endif +#ifdef LDAP_FEATURE_MODIFY_INCREMENT BER_BVC(LDAP_FEATURE_MODIFY_INCREMENT), /* Modify/increment */ #endif {0,NULL} @@ -72,6 +73,8 @@ root_dse_info( = slap_schema.si_ad_supportedFeatures; AttributeDescription *ad_monitorContext = slap_schema.si_ad_monitorContext; + AttributeDescription *ad_configContext + = slap_schema.si_ad_configContext; AttributeDescription *ad_ref = slap_schema.si_ad_ref; @@ -127,7 +130,15 @@ root_dse_info( } continue; } - if ( SLAP_GLUE_SUBORDINATE( &backends[i] ) ) { + if ( SLAP_CONFIG( &backends[i] )) { + vals[0] = backends[i].be_suffix[0]; + nvals[0] = backends[i].be_nsuffix[0]; + if( attr_merge( e, ad_configContext, vals, nvals ) ) { + return LDAP_OTHER; + } + continue; + } + if ( SLAP_GLUE_SUBORDINATE( &backends[i] ) && !SLAP_GLUE_ADVERTISE( &backends[i] ) ) { continue; } for ( j = 0; backends[i].be_suffix[j].bv_val != NULL; j++ ) { @@ -169,7 +180,7 @@ root_dse_info( /* supportedLDAPVersion */ for ( i=LDAP_VERSION_MIN; i<=LDAP_VERSION_MAX; i++ ) { char buf[BUFSIZ]; - if (!( SLAPD_GLOBAL(allows) & SLAP_ALLOW_BIND_V2 ) && + if (!( global_allows & SLAP_ALLOW_BIND_V2 ) && ( i < LDAP_VERSION3 ) ) { /* version 2 and lower are disallowed */ @@ -197,8 +208,8 @@ root_dse_info( ldap_charray_free( supportedSASLMechanisms ); } - if ( SLAPD_GLOBAL(default_referral) != NULL ) { - if( attr_merge( e, ad_ref, SLAPD_GLOBAL(default_referral), NULL /* FIXME */ ) ) { + if ( default_referral != NULL ) { + if( attr_merge( e, ad_ref, default_referral, NULL /* FIXME */ ) ) { return LDAP_OTHER; } }