summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-20 10:07:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:48 -0500
commit2f5f01567b4c30cd764843a1ca0c7ab6d9bc0882 (patch)
tree52876d17edf8162d20c8da7c1761cd0fbb0e0db1 /source4/param
parent238a7e2f4c46f5bb586bcef36f39e1bf6749c2c1 (diff)
downloadsamba-2f5f01567b4c30cd764843a1ca0c7ab6d9bc0882.tar.gz
samba-2f5f01567b4c30cd764843a1ca0c7ab6d9bc0882.tar.bz2
samba-2f5f01567b4c30cd764843a1ca0c7ab6d9bc0882.zip
r8643: - make lp_configfile() work again
- get rid of redundeny dyn_CONFIGFILE argument to lp_load() - fixed provisioning to work with completely pristine install, creating an initial smb.conf is none is present - added lp.set() and lp.reload() to loadparm ejs object interface (This used to be commit c2691ef7126ddcee5f95970b78759b40a049d0a7)
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 354318b2bd..160a7d12de 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -910,6 +910,8 @@ static void init_globals(void)
}
}
+ do_parameter("config file", dyn_CONFIGFILE);
+
/* options that can be set on the command line must be initialised via
the slower do_parameter() to ensure that FLAG_CMDLINE is obeyed */
#ifdef TCP_NODELAY
@@ -2985,21 +2987,14 @@ static void set_server_role(void)
False on failure.
***************************************************************************/
-BOOL lp_load(const char *pszFname)
+BOOL lp_load(void)
{
pstring n2;
BOOL bRetval;
struct param_opt *data;
- pstrcpy(n2, pszFname);
- standard_sub_basic(n2,sizeof(n2));
-
- add_to_file_list(pszFname, n2);
-
bRetval = False;
- DEBUG(2, ("lp_load: refreshing parameters from %s\n", pszFname));
-
bInGlobalSection = True;
if (Globals.param_opt != NULL) {
@@ -3016,6 +3011,12 @@ BOOL lp_load(const char *pszFname)
init_globals();
+ pstrcpy(n2, lp_configfile());
+ standard_sub_basic(n2,sizeof(n2));
+ DEBUG(2, ("lp_load: refreshing parameters from %s\n", n2));
+
+ add_to_file_list(lp_configfile(), n2);
+
/* We get sections first, so have to start 'behind' to make up */
iServiceIndex = -1;
bRetval = pm_process(n2, do_section, do_parameter);