From d518a76b35434cf4e717c7b2221331d1349060b2 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 7 Jul 2005 17:39:29 +0000 Subject: [PATCH] ITS#3844 fix slap_operational_subschemaSubentry --- servers/slapd/frontend.c | 2 ++ servers/slapd/operational.c | 2 +- servers/slapd/slap.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/servers/slapd/frontend.c b/servers/slapd/frontend.c index f9cfe6f466..befc06c766 100644 --- a/servers/slapd/frontend.c +++ b/servers/slapd/frontend.c @@ -82,6 +82,8 @@ frontend_init( void ) /* info */ frontendDB->bd_info = &slap_frontendInfo; + SLAP_BFLAGS(frontendDB) |= SLAP_BFLAG_FRONTEND; + /* name */ frontendDB->bd_info->bi_type = "frontend"; diff --git a/servers/slapd/operational.c b/servers/slapd/operational.c index 44372f596e..9aec4402b3 100644 --- a/servers/slapd/operational.c +++ b/servers/slapd/operational.c @@ -27,7 +27,7 @@ slap_operational_subschemaSubentry( Backend *be ) Attribute *a; /* The backend wants to take care of it */ - if ( be && be!= frontendDB && be->be_schemadn.bv_val ) return NULL; + if ( be && !SLAP_FRONTEND(be) && be->be_schemadn.bv_val ) return NULL; a = ch_malloc( sizeof( Attribute ) ); a->a_desc = slap_schema.si_ad_subschemaSubentry; diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 05fa37faa4..78a41f14ab 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -2111,6 +2111,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_FRONTEND 0x0004U /* the frontendD */ #define SLAP_BFLAG_NOLASTMODCMD 0x0010U #define SLAP_BFLAG_INCREMENT 0x0100U #define SLAP_BFLAG_ALIASES 0x1000U @@ -2121,6 +2122,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_FRONTEND(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_FRONTEND) #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) -- 2.39.5