From: Howard Chu Date: Sat, 11 Jun 2005 00:47:12 +0000 (+0000) Subject: Fix modload/modpath, allow either/both to be empty X-Git-Tag: OPENLDAP_AC_BP~550 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4f28194820e014c7ab6e4a0d3618d4311b61e930;p=openldap Fix modload/modpath, allow either/both to be empty --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 941a4c9399..8c4d873cfb 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -648,8 +648,8 @@ static ConfigOCs cf_ocs[] = { "NAME 'olcModuleList' " "DESC 'OpenLDAP dynamic module info' " "SUP olcConfig STRUCTURAL " - "MUST ( olcModulePath $ olcModuleLoad ) " - "MAY cn )", Cft_Module, NULL, cfAddModule }, + "MAY ( cn $ olcModulePath $ olcModuleLoad ) )", + Cft_Module, NULL, cfAddModule }, #endif { NULL, 0, NULL } }; @@ -833,7 +833,8 @@ config_generic(ConfigArgs *c) { break; case CFG_MODPATH: { ModPaths *mp = c->private; - value_add_one( &c->rvalue_vals, &mp->mp_path ); + if ( !BER_BVISNULL( &mp->mp_path )) + value_add_one( &c->rvalue_vals, &mp->mp_path ); rc = c->rvalue_vals ? 0 : 1; }