Description: nss_wins stop clobbering other daemon's log Author: Christian Perrier ,Buchan Milne Bug-Debian: http://bugs.debian.org/598313 Forwarded: yes Bug: https://bugzilla.samba.org/show_bug.cgi?id=7499 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -475,15 +475,17 @@ if (state.logtype == DEBUG_FILE) { #ifdef WITH_SYSLOG - const char *p = strrchr_m( prog_name,'/' ); - if (p) - prog_name = p + 1; + if (prog_name) { + const char *p = strrchr_m( prog_name,'/' ); + if (p) + prog_name = p + 1; #ifdef LOG_DAEMON - openlog( prog_name, LOG_PID, SYSLOG_FACILITY ); + openlog( prog_name, LOG_PID, SYSLOG_FACILITY ); #else - /* for old systems that have no facility codes. */ - openlog( prog_name, LOG_PID ); + /* for old systems that have no facility codes. */ + openlog( prog_name, LOG_PID ); #endif + } #endif } } --- a/nsswitch/wins.c +++ b/nsswitch/wins.c @@ -52,7 +52,7 @@ lp_set_cmdline("log level", "0"); TimeInit(); - setup_logging("nss_wins",False); + setup_logging(NULL,False); lp_load(get_dyn_CONFIGFILE(),True,False,False,True); load_interfaces(); }