diff options
author | Derrell Lipman <derrell@samba.org> | 2005-03-31 20:28:47 +0000 |
---|---|---|
committer | Derrell Lipman <derrell@samba.org> | 2005-03-31 20:28:47 +0000 |
commit | 1e56176f0432090825665365cee65164ae2ff096 (patch) | |
tree | 4a7d82403549d89011040940817738e5020709c3 /source/libsmb/libsmbclient.c | |
parent | cff587fb19b31e6b16cd9a681d3e8349b0337323 (diff) | |
download | samba-1e56176f0432090825665365cee65164ae2ff096.tar.gz samba-1e56176f0432090825665365cee65164ae2ff096.tar.xz samba-1e56176f0432090825665365cee65164ae2ff096.zip |
r6155: Fixes bug #1133
Added provision for overloading some global configuration options via the new,
per-user file ~/.smb/smb.conf.append which is read after the global config
file is read (and only if the global config file was read). This leave the
original, BC behavior of ~/.smb/smb.conf which, if found, is read but causes
the global config file to not be read.
Also fixed a potential seg fault in to lp_dump_one().
Diffstat (limited to 'source/libsmb/libsmbclient.c')
-rw-r--r-- | source/libsmb/libsmbclient.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index ae9a660a09a..657d0925b0a 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -5169,10 +5169,25 @@ SMBCCTX * smbc_init_context(SMBCCTX * context) * defaults ... */ - if (!lp_load(dyn_CONFIGFILE, True, False, False)) { - DEBUG(5, ("Could not load either config file: %s or %s\n", - conf, dyn_CONFIGFILE)); - } + if (!lp_load(dyn_CONFIGFILE, True, False, False)) { + DEBUG(5, ("Could not load either config file: " + "%s or %s\n", + conf, dyn_CONFIGFILE)); + } else { + /* + * We loaded the global config file. Now lets + * load user-specific modifications to the + * global config. + */ + slprintf(conf, sizeof(conf), + "%s/.smb/smb.conf.append", home); + if (!lp_load(conf, True, False, False)) { + DEBUG(10, + ("Could not append config file: " + "%s\n", + conf)); + } + } } reopen_logs(); /* Get logging working ... */ |