]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r2470: Fix bug 1797: winbind and nmbd ignored "-l" option.
authorVolker Lendecke <vlendec@samba.org>
Tue, 21 Sep 2004 09:07:42 +0000 (09:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:44 +0000 (10:52 -0500)
Thanks to Igor Zhbanov bsg@uniyar.ac.ru.

Volker
(This used to be commit 8a28475a0b7659cb0cdefe57edf801d9958c3755)

source3/nmbd/nmbd.c
source3/nsswitch/winbindd.c

index 880de7f91bf26ce4a318c0ff8934a508aa3e4e34..f8006a22a9edcbb6952f7752c4a0f7d5e77756d5 100644 (file)
@@ -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 );
        
index 78e71b11864b186abeb519b941e17042ac52b60a..455fb74f1716b426c71c066bc136366d70d76bcd 100644 (file)
@@ -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();