1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-22 16:23:49 +03:00

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 commit is contained in:
Derrell Lipman
2006-01-28 22:53:04 +00:00
committed by Gerald (Jerry) Carter
parent 0e24c701ce
commit f2a24de769
41 changed files with 56 additions and 47 deletions

View File

@@ -6025,7 +6025,7 @@ smbc_init_context(SMBCCTX *context)
home = getenv("HOME");
if (home) {
slprintf(conf, sizeof(conf), "%s/.smb/smb.conf", home);
if (lp_load(conf, True, False, False)) {
if (lp_load(conf, True, False, False, True)) {
conf_loaded = True;
} else {
DEBUG(5, ("Could not load config file: %s\n",
@@ -6041,7 +6041,7 @@ smbc_init_context(SMBCCTX *context)
* defaults ...
*/
if (!lp_load(dyn_CONFIGFILE, True, False, False)) {
if (!lp_load(dyn_CONFIGFILE, True, False, False, False)) {
DEBUG(5, ("Could not load config file: %s\n",
dyn_CONFIGFILE));
} else if (home) {
@@ -6052,7 +6052,7 @@ smbc_init_context(SMBCCTX *context)
*/
slprintf(conf, sizeof(conf),
"%s/.smb/smb.conf.append", home);
if (!lp_load(conf, True, False, False)) {
if (!lp_load(conf, True, False, False, False)) {
DEBUG(10,
("Could not append config file: "
"%s\n",