svn commit: samba r2471 - in trunk/source: nmbd nsswitch

vlendec at samba.org vlendec at samba.org
Tue Sep 21 09:08:05 GMT 2004


Author: vlendec
Date: 2004-09-21 09:08:04 +0000 (Tue, 21 Sep 2004)
New Revision: 2471

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source&rev=2471&nolog=1

Log:
Fix bug 1797: winbind and nmbd ignored "-l" option.

Thanks to Igor Zhbanov bsg at uniyar.ac.ru.

Volker

Modified:
   trunk/source/nmbd/nmbd.c
   trunk/source/nsswitch/winbindd.c


Changeset:
Modified: trunk/source/nmbd/nmbd.c
===================================================================
--- trunk/source/nmbd/nmbd.c	2004-09-21 09:07:42 UTC (rev 2470)
+++ trunk/source/nmbd/nmbd.c	2004-09-21 09:08:04 UTC (rev 2471)
@@ -29,6 +29,8 @@
 
 extern BOOL global_in_nmbd;
 
+extern BOOL override_logfile;
+
 /* are we running as a daemon ? */
 static BOOL is_daemon;
 
@@ -673,8 +675,10 @@
 	
 	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 );
 	

Modified: trunk/source/nsswitch/winbindd.c
===================================================================
--- trunk/source/nsswitch/winbindd.c	2004-09-21 09:07:42 UTC (rev 2470)
+++ trunk/source/nsswitch/winbindd.c	2004-09-21 09:08:04 UTC (rev 2471)
@@ -30,6 +30,8 @@
 BOOL opt_ldap_proxy = False;
 int max_busy_children = 0;
 
+extern BOOL override_logfile;
+
 /* Reload configuration */
 
 static BOOL reload_services_file(void)
@@ -1001,8 +1003,10 @@
 		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();
 



More information about the samba-cvs mailing list