summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-09-21 09:07:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:44 -0500
commit3b015a4cc7c0cd6b3662bc89a97df9769e57e7e6 (patch)
treeb7d62236023f61b3d477050e76f946969c09421a
parent0b9e4a98c821424fb12a71bfdf5f66ab98b780d4 (diff)
downloadsamba-3b015a4cc7c0cd6b3662bc89a97df9769e57e7e6.tar.gz
samba-3b015a4cc7c0cd6b3662bc89a97df9769e57e7e6.tar.bz2
samba-3b015a4cc7c0cd6b3662bc89a97df9769e57e7e6.zip
r2470: Fix bug 1797: winbind and nmbd ignored "-l" option.
Thanks to Igor Zhbanov bsg@uniyar.ac.ru. Volker (This used to be commit 8a28475a0b7659cb0cdefe57edf801d9958c3755)
-rw-r--r--source3/nmbd/nmbd.c8
-rw-r--r--source3/nsswitch/winbindd.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 880de7f91b..f8006a22a9 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -29,6 +29,8 @@ int global_nmb_port = -1;
extern BOOL global_in_nmbd;
+extern BOOL override_logfile;
+
/* are we running as a daemon ? */
static BOOL is_daemon;
@@ -623,8 +625,10 @@ static BOOL open_sockets(BOOL isdaemon, int port)
sys_srandom(time(NULL) ^ sys_getpid());
- slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
- lp_set_logfile(logfile);
+ if (!override_logfile) {
+ slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
+ lp_set_logfile(logfile);
+ }
fault_setup((void (*)(void *))fault_continue );
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 78e71b1186..455fb74f17 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -28,6 +28,8 @@
BOOL opt_nocache = False;
BOOL opt_dual_daemon = True;
+extern BOOL override_logfile;
+
/* Reload configuration */
static BOOL reload_services_file(void)
@@ -853,8 +855,10 @@ int main(int argc, char **argv)
exit(1);
}
- pstr_sprintf(logfile, "%s/log.winbindd", dyn_LOGFILEBASE);
- lp_set_logfile(logfile);
+ if (!override_logfile) {
+ pstr_sprintf(logfile, "%s/log.winbindd", dyn_LOGFILEBASE);
+ lp_set_logfile(logfile);
+ }
setup_logging("winbindd", log_stdout);
reopen_logs();