From 78d8a0770834fb362e28c2c236613a60997fcdff Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 25 Nov 2005 17:10:11 +0000 Subject: [PATCH] frontend/config/monitor cannot be shadow, I bet --- servers/slapd/bconfig.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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; } -- 2.39.5