summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-10 11:30:37 -0800
committerJeremy Allison <jra@samba.org>2007-12-10 11:30:37 -0800
commit7faee02d0d351c5c039e8f1be7e82ce3a93cbe96 (patch)
treef79fc09f414f9873d9a985e380b6384c24d00315 /source3/torture
parent0c0054fe1615a504d103da94149d1c1729abb8e2 (diff)
downloadsamba-7faee02d0d351c5c039e8f1be7e82ce3a93cbe96.tar.gz
samba-7faee02d0d351c5c039e8f1be7e82ce3a93cbe96.tar.bz2
samba-7faee02d0d351c5c039e8f1be7e82ce3a93cbe96.zip
Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/locktest.c2
-rw-r--r--source3/torture/locktest2.c2
-rw-r--r--source3/torture/masktest.c2
-rw-r--r--source3/torture/msgtest.c2
-rw-r--r--source3/torture/pdbtest.c2
-rw-r--r--source3/torture/torture.c2
-rw-r--r--source3/torture/vfstest.c6
7 files changed, 9 insertions, 9 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index 4dc8e53578..2ba5ab8f06 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -617,7 +617,7 @@ static void usage(void)
argc -= NSERVERS;
argv += NSERVERS;
- lp_load(dyn_CONFIGFILE,True,False,False,True);
+ lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
load_interfaces();
if (getenv("USER")) {
diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c
index b99fdbc093..68e18439e8 100644
--- a/source3/torture/locktest2.c
+++ b/source3/torture/locktest2.c
@@ -505,7 +505,7 @@ static void usage(void)
argc -= 4;
argv += 4;
- lp_load(dyn_CONFIGFILE,True,False,False,True);
+ lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
load_interfaces();
if (getenv("USER")) {
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 3c037e727b..c5612fefaa 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -482,7 +482,7 @@ static void usage(void)
argc -= 1;
argv += 1;
- lp_load(dyn_CONFIGFILE,True,False,False,True);
+ lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
load_interfaces();
if (getenv("USER")) {
diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c
index 3ef1d1e600..1bb616f6e1 100644
--- a/source3/torture/msgtest.c
+++ b/source3/torture/msgtest.c
@@ -49,7 +49,7 @@ static void pong_message(struct messaging_context *msg_ctx,
setup_logging(argv[0],True);
- lp_load(dyn_CONFIGFILE,False,False,False,True);
+ lp_load(get_dyn_CONFIGFILE(),False,False,False,True);
if (!(evt_ctx = event_context_init(NULL)) ||
!(msg_ctx = messaging_init(NULL, server_id_self(), evt_ctx))) {
diff --git a/source3/torture/pdbtest.c b/source3/torture/pdbtest.c
index a5b7075b4c..77666bb664 100644
--- a/source3/torture/pdbtest.c
+++ b/source3/torture/pdbtest.c
@@ -257,7 +257,7 @@ int main(int argc, char **argv)
poptFreeContext(pc);
/* Load configuration */
- lp_load(dyn_CONFIGFILE, False, False, True, True);
+ lp_load(get_dyn_CONFIGFILE(), False, False, True, True);
setup_logging("pdbtest", True);
if (backend == NULL) {
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 1e6865b754..ad57470c61 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -5309,7 +5309,7 @@ static void usage(void)
load_case_tables();
- lp_load(dyn_CONFIGFILE,True,False,False,True);
+ lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
load_interfaces();
if (argc < 2) {
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c
index 04bcfab3e7..1436ecc022 100644
--- a/source3/torture/vfstest.c
+++ b/source3/torture/vfstest.c
@@ -434,8 +434,8 @@ bool reload_services(bool test)
if (lp_loaded()) {
const char *fname = lp_configfile();
if (file_exist(fname, NULL) &&
- !strcsequal(fname, dyn_CONFIGFILE)) {
- strlcpy(dyn_CONFIGFILE, fname, sizeof(dyn_CONFIGFILE));
+ !strcsequal(fname, get_dyn_CONFIGFILE())) {
+ set_dyn_CONFIGFILE(fname);
test = False;
}
}
@@ -447,7 +447,7 @@ bool reload_services(bool test)
lp_killunused(conn_snum_used);
- ret = lp_load(dyn_CONFIGFILE, False, False, True, True);
+ ret = lp_load(get_dyn_CONFIGFILE(), False, False, True, True);
/* perhaps the config filename is now set */
if (!test)