mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
check parameters
This commit is contained in:
parent
11ddb834be
commit
09e4da6bef
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user