Red Hat Bugzilla – Bug 171536
logrotate script should not run 'kill -HUP' on nmbd
Last modified: 2007-11-30 17:11:15 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Description of problem:
Every Sunday, I get 'debug info' messages from nmbd in /var/log/messages:
Oct 22 04:07:55 server nmbd: [2005/10/22 04:07:55, 0] nmbd/nmbd.c:process(542)
Oct 22 04:07:55 server nmbd: Got SIGHUP dumping debug info.
Oct 22 04:07:55 server nmbd: [2005/10/22 04:07:55, 0] nmbd/nmbd_workgroupdb.c:dump_workgroups(284)
Oct 22 04:07:55 server nmbd: dump_workgroups()
Oct 22 04:07:55 server nmbd: dump workgroup on subnet 192.168.0.9: netmask= 255.255.255.0:
Oct 22 04:07:55 server nmbd: WORKGROUP(1) current master browser = SERVER
Oct 22 04:07:55 server nmbd: SERVER 40049a03 (Samba Server)
Oct 22 04:07:55 server nmbd: WORKST1 40011003 ()
Oct 22 04:07:55 server nmbd: WORKST2 40031003 ()
They're caused by these lines in /etc/logrotate.d/samba:
/bin/kill -HUP `cat /var/run/smbd.pid /var/run/nmbd.pid /var/run/winbindd.pid 2> /dev/null` 2> /dev/null || true
I'm guessing the writer of the script thought that, like many other programs, sending a HUP signal would tell Samba to close & reopen its log files. But as far as I can tell, that isn't the case. The manual pages for smbd, nmbd, and winbindd say nothing about HUP affecting the log files (and in the case of nmbd, the documented behavior is to dump debugging info). Besides, the logrotate script uses the "copytruncate" option, so there's no need to even try to tell the daemons to reopen their log files.
So, to avoid having a bunch of useless 'debug info' printed in /var/log/messages every time logs are rotated, I think the above lines ought to be removed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Look at /var/log/messages after logrotate runs on Sunday.
Actual Results: nmbd spit out a bunch of debugging info.
Expected Results: It shouldn't write any debugging info when rotating logs.
This report targets the FC3 or FC4 products, which have now been EOL'd.
Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?
Issue still exists in FC6's samba-3.0.23c-2 package.
Fixed in rawhide -> FC7