check parameters

This commit is contained in:
Pierangelo Masarati 2005-04-09 00:11:31 +00:00
parent 11ddb834be
commit 09e4da6bef
2 changed files with 12 additions and 3 deletions

View File

@ -227,6 +227,13 @@ monitor_subsys_database_init(
be->be_suffix, be->be_nsuffix );
} else {
if ( be->be_suffix == NULL ) {
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_database_init: "
"missing suffix for database %d\n",
i, 0, 0 );
return -1;
}
attr_merge( e, slap_schema.si_ad_namingContexts,
be->be_suffix, be->be_nsuffix );
attr_merge( e_database, slap_schema.si_ad_namingContexts,

View File

@ -1397,12 +1397,14 @@ config_suffix(ConfigArgs *c) {
SLAP_CONFIG(c->be)) return 1;
if (c->op == SLAP_CONFIG_EMIT) {
if (!BER_BVISNULL( &c->be->be_suffix[0] )) {
if ( c->be->be_suffix == NULL
|| BER_BVISNULL( &c->be->be_suffix[0] ) )
{
return 1;
} else {
value_add( &c->rvalue_vals, c->be->be_suffix );
value_add( &c->rvalue_nvals, c->be->be_nsuffix );
return 0;
} else {
return 1;
}
}
#ifdef SLAPD_MONITOR_DN