summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-01-28 22:53:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:18 -0500
commit9c15bd311db76885b27f30ba92d885833f668550 (patch)
tree20ec704d6d0caa99936d86d32869917592be3b8d /source3/utils
parentba611cb0368629dd7b98c20ed88e9394be0c29e5 (diff)
downloadsamba-9c15bd311db76885b27f30ba92d885833f668550.tar.gz
samba-9c15bd311db76885b27f30ba92d885833f668550.tar.bz2
samba-9c15bd311db76885b27f30ba92d885833f668550.zip
r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based on reading from multiple configuration settings. Each time, it initialized all of the settings back to their defaults before reading the specified configuration file. This patch adds a parameter to lp_load() specifying whether the settings should be initialized. It does, however, still force the settings to be initialized the first time, even if the request was to not initialize them. (Not doing so could wreak havoc due to uninitialized values.) (This used to be commit f2a24de769d1b2266e576597c57a8e3b1e2a2b51)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/eventlogadm.c2
-rw-r--r--source3/utils/net.c2
-rw-r--r--source3/utils/nmblookup.c2
-rw-r--r--source3/utils/ntlm_auth.c2
-rw-r--r--source3/utils/pdbedit.c2
-rw-r--r--source3/utils/smbcacls.c2
-rw-r--r--source3/utils/smbcontrol.c2
-rw-r--r--source3/utils/smbcquotas.c2
-rw-r--r--source3/utils/smbfilter.c2
-rw-r--r--source3/utils/smbpasswd.c2
-rw-r--r--source3/utils/smbtree.c2
-rw-r--r--source3/utils/smbw_sample.c2
-rw-r--r--source3/utils/status.c2
-rw-r--r--source3/utils/testparm.c2
14 files changed, 14 insertions, 14 deletions
diff --git a/source3/utils/eventlogadm.c b/source3/utils/eventlogadm.c
index eef7cde377..8cf79fcf14 100644
--- a/source3/utils/eventlogadm.c
+++ b/source3/utils/eventlogadm.c
@@ -170,7 +170,7 @@ int main( int argc, char *argv[] )
opt_debug = 0; /* todo set this from getopts */
- lp_load( dyn_CONFIGFILE, True, False, False );
+ lp_load( dyn_CONFIGFILE, True, False, False, True);
exename = argv[0];
srcname = NULL;
diff --git a/source3/utils/net.c b/source3/utils/net.c
index a2a9ac6a39..25e10c6a31 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -825,7 +825,7 @@ static struct functable net_func[] = {
* set by cmdline arg or remain default (0)
*/
AllowDebugChange = False;
- lp_load(dyn_CONFIGFILE,True,False,False);
+ lp_load(dyn_CONFIGFILE,True,False,False,True);
argv_new = (const char **)poptGetArgs(pc);
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index e88d786290..12ac1beb7b 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -248,7 +248,7 @@ int main(int argc,char *argv[])
exit(1);
}
- if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
+ if (!lp_load(dyn_CONFIGFILE,True,False,False,True)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE);
}
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 65dbfb7165..4759aec0cc 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -1758,7 +1758,7 @@ enum {
/* Samba client initialisation */
- if (!lp_load(dyn_CONFIGFILE, True, False, False)) {
+ if (!lp_load(dyn_CONFIGFILE, True, False, False, True)) {
d_fprintf(stderr, "ntlm_auth: error opening config file %s. Error was %s\n",
dyn_CONFIGFILE, strerror(errno));
exit(1);
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index 53d3b17d06..f41bbb8caa 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -795,7 +795,7 @@ int main (int argc, char **argv)
if (user_name == NULL)
user_name = poptGetArg(pc);
- if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
+ if (!lp_load(dyn_CONFIGFILE,True,False,False,True)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE);
exit(1);
}
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index cbbd7adaab..26362c6270 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -830,7 +830,7 @@ static struct cli_state *connect_one(const char *share)
setlinebuf(stdout);
- lp_load(dyn_CONFIGFILE,True,False,False);
+ lp_load(dyn_CONFIGFILE,True,False,False,True);
load_interfaces();
pc = poptGetContext("smbcacls", argc, argv, long_options, 0);
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index b8f7c2f2b5..a4d2766b13 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -827,7 +827,7 @@ int main(int argc, const char **argv)
if (argc == 1)
usage(&pc);
- lp_load(dyn_CONFIGFILE,False,False,False);
+ lp_load(dyn_CONFIGFILE,False,False,False,True);
/* Need to invert sense of return code -- samba
* routines mostly return True==1 for success, but
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index f8e3313155..b1a14685f5 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -435,7 +435,7 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" },
fault_setup(NULL);
- lp_load(dyn_CONFIGFILE,True,False,False);
+ lp_load(dyn_CONFIGFILE,True,False,False,True);
load_interfaces();
pc = poptGetContext("smbcquotas", argc, argv, long_options, 0);
diff --git a/source3/utils/smbfilter.c b/source3/utils/smbfilter.c
index 3665647905..97d22230c4 100644
--- a/source3/utils/smbfilter.c
+++ b/source3/utils/smbfilter.c
@@ -236,7 +236,7 @@ int main(int argc, char *argv[])
netbiosname = argv[2];
}
- if (!lp_load(configfile,True,False,False)) {
+ if (!lp_load(configfile,True,False,False,True)) {
d_printf("Unable to load config file\n");
}
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index 29189c5feb..7eb11137d7 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -187,7 +187,7 @@ static int process_options(int argc, char **argv, int local_flags)
usage();
}
- if (!lp_load(configfile,True,False,False)) {
+ if (!lp_load(configfile,True,False,False,True)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n",
dyn_CONFIGFILE);
exit(1);
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index 3755b7f8e5..853a46f379 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -216,7 +216,7 @@ static BOOL print_tree(struct user_auth_info *user_info)
while(poptGetNextOpt(pc) != -1);
poptFreeContext(pc);
- lp_load(dyn_CONFIGFILE,True,False,False);
+ lp_load(dyn_CONFIGFILE,True,False,False,True);
load_interfaces();
/* Parse command line args */
diff --git a/source3/utils/smbw_sample.c b/source3/utils/smbw_sample.c
index 5cd792df7a..ba78eb22fc 100644
--- a/source3/utils/smbw_sample.c
+++ b/source3/utils/smbw_sample.c
@@ -33,7 +33,7 @@ int main(int argc, char *argv[])
extern int optind;
char *path;
- lp_load(dyn_CONFIGFILE,1,0,0);
+ lp_load(dyn_CONFIGFILE,1,0,0,1);
smbw_setup_shared();
while ((opt = getopt(argc, argv, "W:U:R:d:P:l:hL:")) != EOF) {
diff --git a/source3/utils/status.c b/source3/utils/status.c
index eeaf83d177..2aed68be89 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -648,7 +648,7 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
d_printf("using configfile = %s\n", dyn_CONFIGFILE);
}
- if (!lp_load(dyn_CONFIGFILE,False,False,False)) {
+ if (!lp_load(dyn_CONFIGFILE,False,False,False,True)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE);
return (-1);
}
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 11ce960e55..8b9ff4710e 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -266,7 +266,7 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_
fprintf(stderr,"Load smb config files from %s\n",config_file);
- if (!lp_load(config_file,False,True,False)) {
+ if (!lp_load(config_file,False,True,False,True)) {
fprintf(stderr,"Error loading services.\n");
return(1);
}