From: Pierangelo Masarati Date: Fri, 25 Nov 2005 17:10:11 +0000 (+0000) Subject: frontend/config/monitor cannot be shadow, I bet X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~696 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=78d8a0770834fb362e28c2c236613a60997fcdff;p=openldap frontend/config/monitor cannot be shadow, I bet --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index fe7be0dc23..52f4197ce4 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -2554,11 +2554,25 @@ config_updatedn(ConfigArgs *c) { int config_shadow( ConfigArgs *c, int flag ) { - if ( SLAP_MONITOR( c->be ) ) { - Debug( LDAP_DEBUG_ANY, "%s: monitor database cannot be shadow.\n", c->log, 0, 0 ); + char *notallowed = NULL; + + if ( c->be == frontendDB ) { + notallowed = "frontend"; + + } else if ( SLAP_MONITOR(c->be) ) { + notallowed = "monitor"; + + } else if ( SLAP_CONFIG(c->be) ) { + notallowed = "config"; + } + + if ( notallowed != NULL ) { + Debug( LDAP_DEBUG_ANY, "%s: %s database cannot be shadow.\n", c->log, notallowed, 0 ); return 1; } + SLAP_DBFLAGS(c->be) |= (SLAP_DBFLAG_SHADOW | flag); + return 0; }