From 4f28194820e014c7ab6e4a0d3618d4311b61e930 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 11 Jun 2005 00:47:12 +0000 Subject: [PATCH] Fix modload/modpath, allow either/both to be empty --- servers/slapd/bconfig.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } -- 2.39.5