diff options
Diffstat (limited to 'meta-oe/recipes-connectivity/samba/samba-3.6.24/bug_598313_upstream_7499-nss_wins-dont-clobber-daemons-logs.patch')
-rw-r--r-- | meta-oe/recipes-connectivity/samba/samba-3.6.24/bug_598313_upstream_7499-nss_wins-dont-clobber-daemons-logs.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/samba/samba-3.6.24/bug_598313_upstream_7499-nss_wins-dont-clobber-daemons-logs.patch b/meta-oe/recipes-connectivity/samba/samba-3.6.24/bug_598313_upstream_7499-nss_wins-dont-clobber-daemons-logs.patch new file mode 100644 index 000000000..dcd94e425 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba-3.6.24/bug_598313_upstream_7499-nss_wins-dont-clobber-daemons-logs.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | Description: nss_wins stop clobbering other daemon's log | ||
2 | Author: Christian Perrier <bubulle@debian.org>,Buchan Milne | ||
3 | Bug-Debian: http://bugs.debian.org/598313 | ||
4 | Forwarded: yes | ||
5 | Bug: https://bugzilla.samba.org/show_bug.cgi?id=7499 | ||
6 | |||
7 | Index: samba/lib/util/debug.c | ||
8 | =================================================================== | ||
9 | --- samba.orig/lib/util/debug.c | ||
10 | +++ samba/lib/util/debug.c | ||
11 | @@ -474,15 +474,17 @@ | ||
12 | |||
13 | if (state.logtype == DEBUG_FILE) { | ||
14 | #ifdef WITH_SYSLOG | ||
15 | - const char *p = strrchr_m( prog_name,'/' ); | ||
16 | - if (p) | ||
17 | - prog_name = p + 1; | ||
18 | + if (prog_name) { | ||
19 | + const char *p = strrchr_m( prog_name,'/' ); | ||
20 | + if (p) | ||
21 | + prog_name = p + 1; | ||
22 | #ifdef LOG_DAEMON | ||
23 | - openlog( prog_name, LOG_PID, SYSLOG_FACILITY ); | ||
24 | + openlog( prog_name, LOG_PID, SYSLOG_FACILITY ); | ||
25 | #else | ||
26 | - /* for old systems that have no facility codes. */ | ||
27 | - openlog( prog_name, LOG_PID ); | ||
28 | + /* for old systems that have no facility codes. */ | ||
29 | + openlog( prog_name, LOG_PID ); | ||
30 | #endif | ||
31 | + } | ||
32 | #endif | ||
33 | } | ||
34 | } | ||
35 | Index: samba/nsswitch/wins.c | ||
36 | =================================================================== | ||
37 | --- samba.orig/nsswitch/wins.c | ||
38 | +++ samba/nsswitch/wins.c | ||
39 | @@ -52,7 +52,7 @@ | ||
40 | lp_set_cmdline("log level", "0"); | ||
41 | |||
42 | TimeInit(); | ||
43 | - setup_logging("nss_wins",False); | ||
44 | + setup_logging(NULL,False); | ||
45 | lp_load(get_dyn_CONFIGFILE(),True,False,False,True); | ||
46 | load_interfaces(); | ||
47 | } | ||