Move cn=config from namingContexts to configContext

This commit is contained in:
Howard Chu 2005-03-14 23:21:00 +00:00
parent 902494b432
commit a49215d4bf
4 changed files with 29 additions and 1 deletions

View file

@ -578,7 +578,7 @@ static ConfigOCs cf_ocs[] = {
"NAME 'olcDatabaseConfig' "
"DESC 'OpenLDAP Database-specific options' "
"SUP olcConfig STRUCTURAL "
"MAY ( olcDatabase $ olcLastMod $ olcLimits $ "
"MAY ( olcDatabase $ olcAccess $ olcLastMod $ olcLimits $ "
"olcMaxDerefDepth $ olcPlugin $ olcReadOnly $ olcReplica $ "
"olcReplogFile $ olcRequires $ olcRestrict $ olcRootDN $ olcRootPW $ "
"olcSchemaDN $ olcSecurity $ olcSizeLimit $ olcSuffix $ olcSyncrepl $ "
@ -2862,6 +2862,7 @@ config_back_db_open( BackendDB *be )
oprev = ce;
}
}
#if 0
/* Set up ACLs */
if ( bptr->be_acl ) {
Entry *ae;
@ -2880,6 +2881,7 @@ config_back_db_open( BackendDB *be )
}
opar->ce_kids = ce;
}
#endif
}
return 0;
@ -2909,6 +2911,9 @@ config_back_db_init( Backend *be )
ber_dupbv( &dn, &be->be_rootdn );
ber_bvarray_add( &be->be_nsuffix, &dn );
/* Hide from namingContexts */
SLAP_BFLAGS(be) |= SLAP_BFLAG_CONFIG;
return 0;
}

View file

@ -73,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;
@ -128,6 +130,14 @@ root_dse_info(
}
continue;
}
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;
}

View file

@ -689,6 +689,16 @@ static struct slap_schema_ad_map {
NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_monitorContext) },
{ "configContext", "( 1.3.6.1.4.1.4203.666.11.1.1 "
"NAME 'configContext' "
"DESC 'config context' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 "
"SINGLE-VALUE NO-USER-MODIFICATION "
"USAGE dSAOperation )",
rootDseAttribute, SLAP_AT_HIDE,
NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_configContext) },
{ "vendorName", "( 1.3.6.1.1.4 NAME 'vendorName' "
"DESC 'RFC3045: name of implementation vendor' "
"EQUALITY caseExactMatch "

View file

@ -822,6 +822,7 @@ struct slap_internal_schema {
AttributeDescription *si_ad_monitorContext;
AttributeDescription *si_ad_vendorName;
AttributeDescription *si_ad_vendorVersion;
AttributeDescription *si_ad_configContext;
/* subentry attribute descriptions */
AttributeDescription *si_ad_administrativeRole;
@ -2029,6 +2030,7 @@ struct slap_backend_info {
slap_mask_t bi_flags; /* backend flags */
#define SLAP_BFLAG_MONITOR 0x0001U /* a monitor backend */
#define SLAP_BFLAG_CONFIG 0x0002U /* a config backend */
#define SLAP_BFLAG_NOLASTMODCMD 0x0010U
#define SLAP_BFLAG_INCREMENT 0x0100U
#define SLAP_BFLAG_ALIASES 0x1000U
@ -2038,6 +2040,7 @@ struct slap_backend_info {
#define SLAP_BFLAGS(be) ((be)->bd_info->bi_flags)
#define SLAP_MONITOR(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_MONITOR)
#define SLAP_CONFIG(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_CONFIG)
#define SLAP_INCREMENT(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_INCREMENT)
#define SLAP_ALIASES(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_ALIASES)
#define SLAP_REFERRALS(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_REFERRALS)