mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
frontend/config/monitor cannot be shadow, I bet
This commit is contained in:
parent
f3c007229f
commit
78d8a07708
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user