diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-06-13 10:01:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:18:07 -0500 |
commit | 00e2b7c1b49b128488cf977b40b086b935fb605a (patch) | |
tree | 0d68e4e6359ed6f9e2971dc6986db726ca1af6ac /source4/param | |
parent | 68c15667f5c80b1990616829301990315c9a2254 (diff) | |
download | samba-00e2b7c1b49b128488cf977b40b086b935fb605a.tar.gz samba-00e2b7c1b49b128488cf977b40b086b935fb605a.tar.bz2 samba-00e2b7c1b49b128488cf977b40b086b935fb605a.zip |
r7530: Simply calling convention of lp_load().
This always loads all the services, as we now don't have an easy way
to split out smbd.
Andrew Bartlett
(This used to be commit 990e061939c76b559c4f5914c5fc6ca1b13e19dd)
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/loadparm.c | 65 |
1 files changed, 7 insertions, 58 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 15a054863f..a546d51438 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -381,7 +381,6 @@ static service **ServicePtrs = NULL; static int iNumServices = 0; static int iServiceIndex = 0; static BOOL bInGlobalSection = True; -static BOOL bGlobalOnly = False; static int server_role; static int default_server_announce; @@ -2429,7 +2428,7 @@ BOOL lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue static BOOL do_parameter(const char *pszParmName, const char *pszParmValue) { - if (!bInGlobalSection && bGlobalOnly) + if (!bInGlobalSection) return (True); return (lp_do_parameter(bInGlobalSection ? -2 : iServiceIndex, @@ -2632,7 +2631,7 @@ static BOOL do_section(const char *pszSectionName) return (True); } - if (!bInGlobalSection && bGlobalOnly) + if (!bInGlobalSection) return (True); /* if we have a current service, tidy it up before moving on */ @@ -2907,47 +2906,6 @@ void lp_killservice(int iServiceIn) } } -/*************************************************************************** - Save the curent values of all global and sDefault parameters into the - defaults union. This allows swat and testparm to show only the - changed (ie. non-default) parameters. -***************************************************************************/ - -static void lp_save_defaults(void) -{ - int i; - for (i = 0; parm_table[i].label; i++) { - if (i > 0 && parm_table[i].ptr == parm_table[i - 1].ptr) - continue; - switch (parm_table[i].type) { - case P_LIST: - parm_table[i].def.lvalue = str_list_copy(talloc_autofree_context(), - *(const char ***)parm_table[i].ptr); - break; - case P_STRING: - case P_USTRING: - if (parm_table[i].ptr) { - parm_table[i].def.svalue = strdup(*(char **)parm_table[i].ptr); - } else { - parm_table[i].def.svalue = NULL; - } - break; - case P_BOOL: - parm_table[i].def.bvalue = - *(BOOL *)parm_table[i].ptr; - break; - case P_INTEGER: - case P_ENUM: - parm_table[i].def.ivalue = - *(int *)parm_table[i].ptr; - break; - case P_SEP: - break; - } - } - defaults_saved = True; -} - /******************************************************************* Set the server type we will announce as via nmbd. ********************************************************************/ @@ -3010,8 +2968,7 @@ static void set_server_role(void) False on failure. ***************************************************************************/ -BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults, - BOOL add_ipc) +BOOL lp_load(const char *pszFname) { pstring n2; BOOL bRetval; @@ -3027,7 +2984,6 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults, DEBUG(2, ("lp_load: refreshing parameters from %s\n", pszFname)); bInGlobalSection = True; - bGlobalOnly = global_only; if (Globals.param_opt != NULL) { struct param_opt *next; @@ -3043,11 +2999,6 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults, init_globals(); - if (save_defaults) - { - lp_save_defaults(); - } - /* We get sections first, so have to start 'behind' to make up */ iServiceIndex = -1; bRetval = pm_process(n2, do_section, do_parameter); @@ -3060,12 +3011,10 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults, lp_add_auto_services(lp_auto_services()); - if (add_ipc) { - /* When 'restrict anonymous = 2' guest connections to ipc$ - are denied */ - lp_add_hidden("IPC$", "IPC", (lp_restrict_anonymous() < 2)); - lp_add_hidden("ADMIN$", "DISK", False); - } + /* When 'restrict anonymous = 2' guest connections to ipc$ + are denied */ + lp_add_hidden("IPC$", "IPC", (lp_restrict_anonymous() < 2)); + lp_add_hidden("ADMIN$", "DISK", False); set_server_role(); set_default_server_announce_type(); |