summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-06 22:23:54 +0200
committerMichael Adam <obnox@samba.org>2008-04-17 18:39:00 +0200
commit2e1e83b4c0744bbd0974ab6cccf1f7fec516773c (patch)
tree8507e1ac5ab7c202540c16d154d580510db4172e /source3
parent78d88cbaeb21915ffdba45f1844cfd2a8534c874 (diff)
downloadsamba-2e1e83b4c0744bbd0974ab6cccf1f7fec516773c.tar.gz
samba-2e1e83b4c0744bbd0974ab6cccf1f7fec516773c.tar.bz2
samba-2e1e83b4c0744bbd0974ab6cccf1f7fec516773c.zip
loadparm: reactivate special semantics of "include = registry" for now.
This includes the configuration stored in HKLM/Software/Samba/smbconf . Michael (This used to be commit 42c7fb4ddfab9ff7592593533099ae872c1edca7)
Diffstat (limited to 'source3')
-rw-r--r--source3/param/loadparm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 71632cd753..9595ebdb18 100644
--- a/source3/param/loadparm.c
+++ b/source3/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);