diff options
author | Derrell Lipman <derrell@samba.org> | 2006-01-28 22:53:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:06:18 -0500 |
commit | 9c15bd311db76885b27f30ba92d885833f668550 (patch) | |
tree | 20ec704d6d0caa99936d86d32869917592be3b8d /source3/torture | |
parent | ba611cb0368629dd7b98c20ed88e9394be0c29e5 (diff) | |
download | samba-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/torture')
-rw-r--r-- | source3/torture/locktest.c | 2 | ||||
-rw-r--r-- | source3/torture/locktest2.c | 2 | ||||
-rw-r--r-- | source3/torture/masktest.c | 2 | ||||
-rw-r--r-- | source3/torture/msgtest.c | 2 | ||||
-rw-r--r-- | source3/torture/rpctorture.c | 2 | ||||
-rw-r--r-- | source3/torture/t_push_ucs2.c | 2 | ||||
-rw-r--r-- | source3/torture/t_strcmp.c | 2 | ||||
-rw-r--r-- | source3/torture/t_strstr.c | 2 | ||||
-rw-r--r-- | source3/torture/torture.c | 2 | ||||
-rw-r--r-- | source3/torture/vfstest.c | 4 |
10 files changed, 11 insertions, 11 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index c8336ebaf6..913df885ba 100644 --- a/source3/torture/locktest.c +++ b/source3/torture/locktest.c @@ -586,7 +586,7 @@ static void usage(void) argc -= NSERVERS; argv += NSERVERS; - lp_load(dyn_CONFIGFILE,True,False,False); + lp_load(dyn_CONFIGFILE,True,False,False,True); load_interfaces(); if (getenv("USER")) { diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c index fc180bfafe..519acebe8e 100644 --- a/source3/torture/locktest2.c +++ b/source3/torture/locktest2.c @@ -498,7 +498,7 @@ static void usage(void) argc -= 4; argv += 4; - lp_load(dyn_CONFIGFILE,True,False,False); + lp_load(dyn_CONFIGFILE,True,False,False,True); load_interfaces(); if (getenv("USER")) { diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c index 07bfe69121..ffc9a20e71 100644 --- a/source3/torture/masktest.c +++ b/source3/torture/masktest.c @@ -454,7 +454,7 @@ static void usage(void) argc -= 1; argv += 1; - lp_load(dyn_CONFIGFILE,True,False,False); + lp_load(dyn_CONFIGFILE,True,False,False,True); load_interfaces(); if (getenv("USER")) { diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c index d691ab32f1..f7c47ddbbf 100644 --- a/source3/torture/msgtest.c +++ b/source3/torture/msgtest.c @@ -41,7 +41,7 @@ void pong_message(int msg_type, struct process_id src, void *buf, size_t len) setup_logging(argv[0],True); - lp_load(dyn_CONFIGFILE,False,False,False); + lp_load(dyn_CONFIGFILE,False,False,False,True); message_init(); diff --git a/source3/torture/rpctorture.c b/source3/torture/rpctorture.c index 28067c1a0a..d69cc8eb8d 100644 --- a/source3/torture/rpctorture.c +++ b/source3/torture/rpctorture.c @@ -242,7 +242,7 @@ enum client_action *term_code = 0; #endif /* KANJI */ - 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/torture/t_push_ucs2.c b/source3/torture/t_push_ucs2.c index 8bfc6f7ad9..8d327acfa5 100644 --- a/source3/torture/t_push_ucs2.c +++ b/source3/torture/t_push_ucs2.c @@ -33,7 +33,7 @@ int main(int argc, char *argv[]) int count = 1; /* Needed to initialize character set */ - lp_load("/dev/null", True, False, False); + lp_load("/dev/null", True, False, False, True); if (argc < 2) { fprintf(stderr, "usage: %s STRING1 [COUNT]\n" diff --git a/source3/torture/t_strcmp.c b/source3/torture/t_strcmp.c index bc8640ee55..318423b8be 100644 --- a/source3/torture/t_strcmp.c +++ b/source3/torture/t_strcmp.c @@ -12,7 +12,7 @@ int main(int argc, char *argv[]) int iters = 1; /* Needed to initialize character set */ - lp_load("/dev/null", True, False, False); + lp_load("/dev/null", True, False, False, True); if (argc < 3) { fprintf(stderr, "usage: %s STRING1 STRING2 [ITERS]\n" diff --git a/source3/torture/t_strstr.c b/source3/torture/t_strstr.c index 7b928fb26b..49180b219f 100644 --- a/source3/torture/t_strstr.c +++ b/source3/torture/t_strstr.c @@ -14,7 +14,7 @@ int main(int argc, char *argv[]) const char *ret = NULL; /* Needed to initialize character set */ - lp_load("/dev/null", True, False, False); + lp_load("/dev/null", True, False, False, True); if (argc < 3) { fprintf(stderr, "usage: %s STRING1 STRING2 [ITERS]\n" diff --git a/source3/torture/torture.c b/source3/torture/torture.c index e995c3cc58..0b3bfc18f4 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -4916,7 +4916,7 @@ static void usage(void) load_case_tables(); - lp_load(dyn_CONFIGFILE,True,False,False); + lp_load(dyn_CONFIGFILE,True,False,False,True); load_interfaces(); if (argc < 2) { diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index 1914a4acb5..023e656c67 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -113,7 +113,7 @@ static NTSTATUS cmd_conf(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } - if (!lp_load(argv[1], False, True, False)) { + if (!lp_load(argv[1], False, True, False, True)) { printf("Error loading \"%s\"\n", argv[1]); return NT_STATUS_OK; } @@ -448,7 +448,7 @@ BOOL reload_services(BOOL test) lp_killunused(conn_snum_used); - ret = lp_load(dyn_CONFIGFILE, False, False, True); + ret = lp_load(dyn_CONFIGFILE, False, False, True, True); /* perhaps the config filename is now set */ if (!test) |