diff options
author | Richard Sharpe <sharpe@samba.org> | 2003-04-06 17:22:41 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 2003-04-06 17:22:41 +0000 |
commit | f4cc85c6c97e7a3e0b63eb4570ca24f1e950379a (patch) | |
tree | 38641388de2e8fba24af9123952d295e550073f7 /source3/libsmb | |
parent | df883f35b28a4991470bd081f63a378225bdf827 (diff) | |
download | samba-f4cc85c6c97e7a3e0b63eb4570ca24f1e950379a.tar.gz samba-f4cc85c6c97e7a3e0b63eb4570ca24f1e950379a.tar.bz2 samba-f4cc85c6c97e7a3e0b63eb4570ca24f1e950379a.zip |
Fix the handling of smb.conf in libsmbclient.
The right thing to do is to try for the user's local one in ~/.smbc/smb.conf,
and if that fails, try the one in dyn_CONFIGFILE, and if that fails, keep
going with the defaults but log a message.
(This used to be commit 15fa48d19d178cf8bf214ea02f6c7a4c38890f71)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmbclient.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index a0223568f1..69c4d8f7a7 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -2688,13 +2688,16 @@ SMBCCTX * smbc_init_context(SMBCCTX * context) if (!lp_load(conf, True, False, False)) { /* - * Hmmm, what the hell do we do here ... we could not parse the - * config file ... We must return an error ... and keep info around - * about why we failed + * Well, if that failed, try the dyn_CONFIGFILE + * Which points to the standard locn, and if that + * fails, silently ignore it and use the internal + * defaults ... */ - - errno = ENOENT; /* FIXME: Figure out the correct error response */ - return NULL; + + if (!lp_load(dyn_CONFIGFILE, True, False, False)) { + DEBUG(5, ("Could not load either config file: %s or %s\n", + conf, dyn_CONFIGFILE)); + } } reopen_logs(); /* Get logging working ... */ |