The Samba-Bugzilla – Attachment 16843 Details for
Bug 14852
child winbindd logs to log.winbindd instead of log.wb-<DOMAIN>
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for v4-15
Patch for 4.15 (text/plain), 3.84 KB, created by
Pavel Filipenský
on 2021-10-08 19:48:55 UTC
(
hide
)
Description:
patch for v4-15
Filename:
MIME Type:
Creator:
Pavel Filipenský
Created:
2021-10-08 19:48:55 UTC
Size:
3.84 KB
patch
obsolete
>From 75a2ee34d77df29581b33aa143f26fdd069b1edb Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Pavel=20Filipensk=C3=BD?= <pfilipen@redhat.com> >Date: Thu, 7 Oct 2021 12:08:22 +0200 >Subject: [PATCH 1/2] s3:winbindd: Fix winbindd child logfile name handling >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14852 > >Handling of logfile name for main and child winbindd must ensure: > >1) Log directory is selected in this order: > * -l option of winbindd > * "log file" parameter in smb.conf > * compile time value '/usr/local/samba/var' > >2) Log filename pattern > * parent process uses log.winbindd > * child uses log.wb-<name> > >3) Log reopen works for both parent and child (i.e. log filename is not changed) > * kill -HUP <pid> > * smbcontrol <pid> reload-config > >This commit removes 3 calls of is_default_dyn_LOGFILEBASE() to make sure that: > - 1st removal: child uses log.wb-<name> after the fork > - 2nd removal: child after HUP signal, does not switch to log.winbindd > - 3rd removal: child after smbcontrol reload-config, does not switch to > log.winbindd > >Interesting commits: bfa1b2a8 1484b7f3 3b015a4c d1f7a371 > >Signed-off-by: Pavel Filipenský <pfilipen@redhat.com> >--- > source3/winbindd/winbindd_dual.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c >index e19dfafc52f..b275dfb128c 100644 >--- a/source3/winbindd/winbindd_dual.c >+++ b/source3/winbindd/winbindd_dual.c >@@ -1544,15 +1544,16 @@ NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself, > > close_conns_after_fork(); > >- if (is_default_dyn_LOGFILEBASE() && logfilename) { >+ if (logfilename != NULL) { > lp_set_logfile(logfilename); > reopen_logs(); > } > >- if (!winbindd_setup_sig_term_handler(false)) >+ if (!winbindd_setup_sig_term_handler(false)) { > return NT_STATUS_NO_MEMORY; >- if (!winbindd_setup_sig_hup_handler( >- !is_default_dyn_LOGFILEBASE() ? NULL : logfilename)) { >+ } >+ >+ if (!winbindd_setup_sig_hup_handler(logfilename)) { > return NT_STATUS_NO_MEMORY; > } > >@@ -1777,7 +1778,7 @@ static bool fork_domain_child(struct winbindd_child *child) > winbind_msg_disconnect_dc); > messaging_register( > global_messaging_context(), >- !is_default_dyn_LOGFILEBASE() ? NULL : child->logfilename, >+ child->logfilename, > MSG_SMB_CONF_UPDATED, > winbindd_msg_reload_services_child); > >-- >2.31.1 > > >From 251a0bf88b998fa81a04cbd32d4e9846e1422ae8 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Pavel=20Filipensk=C3=BD?= <pfilipen@redhat.com> >Date: Fri, 8 Oct 2021 13:16:05 +0200 >Subject: [PATCH 2/2] docs-xml: Update winbindd(8) manpage >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14852 > >Signed-off-by: Pavel Filipenský <pfilipen@redhat.com> >--- > docs-xml/manpages/winbindd.8.xml | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > >diff --git a/docs-xml/manpages/winbindd.8.xml b/docs-xml/manpages/winbindd.8.xml >index 3b7487c1b1c..7a643b8879c 100644 >--- a/docs-xml/manpages/winbindd.8.xml >+++ b/docs-xml/manpages/winbindd.8.xml >@@ -195,7 +195,25 @@ hosts: files wins > </para></listitem> > </varlistentry> > >- &cmdline.common.samba.server; >+ &cmdline.common.debug.server; >+ &cmdline.common.config.server; >+ &cmdline.common.option; >+ >+ <varlistentry> >+ <term>-l|--log-basename=logdirectory</term> >+ <listitem> >+ <para> >+ Base directory name for log/debug files. The parent process >+ uses filename log.winbindd, the child process uses filename >+ log.wb-<name>. The log file is never removed by winbindd. >+ </para> >+ </listitem> >+ </varlistentry> >+ >+ &cmdline.common.samba.leakreport; >+ &cmdline.common.samba.leakreportfull; >+ &cmdline.version; >+ > &popt.autohelp; > > </variablelist> >-- >2.31.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14852
:
16843
|
16860