Commit 7a4e70f3 authored by Howard Chu's avatar Howard Chu
Browse files

ITS#8577 don't allow setting logDB to current DB

parent 696d5656
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment