]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
loadparm: add parameter allow_registry_shares to lp_load_ex().
authorMichael Adam <obnox@samba.org>
Thu, 15 May 2008 00:25:34 +0000 (02:25 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 15 May 2008 00:42:41 +0000 (02:42 +0200)
This allows for registry shares to be activated, i.e. loaded into
the services array at lp_load() time.

Michael

source/param/loadparm.c

index 9eee1691a8f625e33385fca5c22eb5549a8e6090..0d116f87904c1927dd4d19d514839affc66e50ec 100644 (file)
@@ -8719,7 +8719,8 @@ bool lp_load_ex(const char *pszFname,
                bool save_defaults,
                bool add_ipc,
                bool initialize_globals,
-               bool allow_include_registry)
+               bool allow_include_registry,
+               bool allow_registry_shares)
 {
        char *n2 = NULL;
        bool bRetval;
@@ -8793,7 +8794,8 @@ bool lp_load_ex(const char *pszFname,
                        lp_kill_all_services();
                        return lp_load_ex(pszFname, global_only, save_defaults,
                                          add_ipc, initialize_globals,
-                                         allow_include_registry);
+                                         allow_include_registry,
+                                         allow_registry_shares);
                }
        } else if (lp_config_backend_is_registry()) {
                bRetval = process_registry_globals();
@@ -8803,6 +8805,10 @@ bool lp_load_ex(const char *pszFname,
                bRetval = false;
        }
 
+       if (bRetval && lp_registry_shares() && allow_registry_shares) {
+               bRetval = process_registry_shares();
+       }
+
        lp_add_auto_services(lp_auto_services());
 
        if (add_ipc) {
@@ -8844,7 +8850,7 @@ bool lp_load(const char *pszFname,
                          save_defaults,
                          add_ipc,
                          initialize_globals,
-                         true);
+                         true, false);
 }
 
 bool lp_load_initial_only(const char *pszFname)
@@ -8854,6 +8860,7 @@ bool lp_load_initial_only(const char *pszFname)
                          false,
                          false,
                          true,
+                         false,
                          false);
 }