diff options
author | Michael Adam <obnox@samba.org> | 2008-04-06 22:23:54 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-04-21 08:40:38 +0200 |
commit | a570ab0b8955987e5f2e9bc5b7b301c83398ad40 (patch) | |
tree | 1aa12105dd17cffe4b89cdc63231b8d89970202d /source | |
parent | 2677d7d8a9888bc9425fe7f2aa3aabc6606378d0 (diff) | |
download | samba-a570ab0b8955987e5f2e9bc5b7b301c83398ad40.tar.gz samba-a570ab0b8955987e5f2e9bc5b7b301c83398ad40.tar.xz samba-a570ab0b8955987e5f2e9bc5b7b301c83398ad40.zip |
loadparm: reactivate special semantics of "include = registry" for now.
This includes the configuration stored in HKLM/Software/Samba/smbconf .
Michael
(cherry picked from commit 42c7fb4ddfab9ff7592593533099ae872c1edca7)
Diffstat (limited to 'source')
-rw-r--r-- | source/param/loadparm.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 29b2ce67935..432487a503a 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -70,6 +70,14 @@ 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 bool in_client = False; /* Not in the client by default */ static struct smbconf_csn conf_last_csn; static struct smbconf_ctx *conf_ctx = NULL; @@ -6724,6 +6732,16 @@ 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(); + } 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); |