frontend/config/monitor cannot be shadow, I bet

This commit is contained in:
Pierangelo Masarati 2005-11-25 17:10:11 +00:00
parent f3c007229f
commit 78d8a07708

View File

@ -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;
}