]> git.sur5r.net Git - openldap/commitdiff
Fix modload/modpath, allow either/both to be empty
authorHoward Chu <hyc@openldap.org>
Sat, 11 Jun 2005 00:47:12 +0000 (00:47 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 11 Jun 2005 00:47:12 +0000 (00:47 +0000)
servers/slapd/bconfig.c

index 941a4c9399abcaefa2ac42a829d5e0500d89d051..8c4d873cfbe4d3792c9fa72a520bd819554886b1 100644 (file)
@@ -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;
                        }