Remove special semantics of "include = registry" from loadparm.c
authorMichael Adam <obnox@samba.org>
Wed, 16 Jan 2008 16:09:07 +0000 (17:09 +0100)
committerMichael Adam <obnox@samba.org>
Wed, 16 Jan 2008 16:10:02 +0000 (17:10 +0100)
This is now replaced by "config backend = registry".

Michael

source/param/loadparm.c

index 90b015b5a223999afd33e8ae3fc39374b178e692..4fc8b89ec1bc7c37c5210a1a20299917ddacc315 100644 (file)
@@ -70,16 +70,7 @@ extern userdom_struct current_user_info;
 #define HOMES_NAME "homes"
 #endif
 
-/* the special value for the include parameter
- * to be interpreted not as a file name but to
- * trigger loading of the global smb.conf options
- * from registry. */
-#ifndef INCLUDE_REGISTRY_NAME
-#define INCLUDE_REGISTRY_NAME "registry"
-#endif
-
 static int regdb_last_seqnum = 0;
-static bool include_registry_globals = False;
 
 #define CONFIG_BACKEND_FILE 0
 #define CONFIG_BACKEND_REGISTRY 1
@@ -3443,8 +3434,6 @@ static bool process_registry_globals(bool (*pfunc)(const char *, const char *))
        char * valstr;
        struct registry_value *value = NULL;
 
-       include_registry_globals = True;
-
        ZERO_STRUCT(data);
 
        reg_tdb = lp_regdb_open();
@@ -3557,8 +3546,6 @@ static bool process_registry_globals(bool (*pfunc)(const char *, const char *))
                smb_panic("Failed to create talloc context!");
        }
 
-       include_registry_globals = True;
-
        if (!registry_init_regdb()) {
                DEBUG(1, ("Error initializing the registry.\n"));
                goto done;
@@ -3658,11 +3645,6 @@ static void add_to_file_list(const char *fname, const char *subfname)
        }
 }
 
-bool lp_include_registry_globals(void)
-{
-       return include_registry_globals;
-}
-
 /**
  * Utility function for outsiders to check if we're running on registry.
  */
@@ -3804,17 +3786,6 @@ static bool handle_include(int snum, const char *pszParmValue, char **ptr)
 {
        char *fname;
 
-       if (strequal(pszParmValue, INCLUDE_REGISTRY_NAME)) {
-               if (bInGlobalSection) {
-                       return process_registry_globals(do_parameter);
-               }
-               else {
-                       DEBUG(1, ("\"include = registry\" only effective "
-                                 "in %s section\n", GLOBAL_NAME));
-                       return false;
-               }
-       }
-
        fname = alloc_sub_basic(get_current_username(),
                                current_user_info.domain,
                                pszParmValue);