diff options
author | Jeremy Allison <jra@samba.org> | 2007-12-10 11:30:37 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-10 11:30:37 -0800 |
commit | 7faee02d0d351c5c039e8f1be7e82ce3a93cbe96 (patch) | |
tree | f79fc09f414f9873d9a985e380b6384c24d00315 /source3/smbd | |
parent | 0c0054fe1615a504d103da94149d1c1729abb8e2 (diff) | |
download | samba-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/smbd')
-rw-r--r-- | source3/smbd/lanman.c | 2 | ||||
-rw-r--r-- | source3/smbd/server.c | 6 |
2 files changed, 4 insertions, 4 deletions
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(); |