mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-10 22:33:07 -05:00
ITS#8577 don't allow setting logDB to current DB
This commit is contained in:
parent
696d5656fa
commit
7a4e70f3e6
1 changed files with 13 additions and 0 deletions
|
|
@ -941,6 +941,14 @@ log_cf_gen(ConfigArgs *c)
|
|||
c->log, c->cr_msg, c->value_dn.bv_val );
|
||||
rc = 1;
|
||||
}
|
||||
if ( !rc && ( li->li_db->bd_self == c->be->bd_self )) {
|
||||
snprintf( c->cr_msg, sizeof( c->cr_msg ),
|
||||
"<%s> invalid suffix, points to itself",
|
||||
c->argv[0] );
|
||||
Debug( LDAP_DEBUG_ANY, "%s: %s \"%s\"\n",
|
||||
c->log, c->cr_msg, c->value_dn.bv_val );
|
||||
rc = 1;
|
||||
}
|
||||
ch_free( c->value_ndn.bv_val );
|
||||
} else {
|
||||
li->li_db_suffix = c->value_ndn;
|
||||
|
|
@ -2413,6 +2421,11 @@ accesslog_db_open(
|
|||
"accesslog: \"logdb <suffix>\" missing or invalid.\n" );
|
||||
return 1;
|
||||
}
|
||||
if ( li->li_db->bd_self == be->bd_self ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"accesslog: \"logdb <suffix>\" is this database, cannot log to itself.\n" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( slapMode & SLAP_TOOL_MODE )
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue