From 7faee02d0d351c5c039e8f1be7e82ce3a93cbe96 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 10 Dec 2007 11:30:37 -0800 Subject: 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) --- source3/smbd/lanman.c | 2 +- source3/smbd/server.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index feb5fa4b05..7df7de36dc 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -1972,7 +1972,7 @@ static bool api_RNetShareAdd(connection_struct *conn,uint16 vuid, } asprintf(&command, "%s \"%s\" \"%s\" \"%s\" \"%s\"", - lp_add_share_cmd(), dyn_CONFIGFILE, sharename, pathname, comment); + lp_add_share_cmd(), get_dyn_CONFIGFILE(), sharename, pathname, comment); if (command) { DEBUG(10,("api_RNetShareAdd: Running [%s]\n", command )); diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 7d0dff0480..0aa8dac18d 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -738,8 +738,8 @@ bool reload_services(bool test) if (lp_loaded()) { 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; } } @@ -751,7 +751,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); reload_printers(); -- cgit