Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 15343

Summary: incorrect pid files
Product: [Retired] Red Hat Linux Reporter: mal
Component: sambaAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-07 19:10:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mal 2000-08-04 02:04:31 UTC
There are two problems with pid files:

1. Pid file has some garbage in the end.
less /var/lock/samba/smbd.pid 
2365
^@^@^@^@^@^@^@^@^@^@^@^@^@^@
there is a line after process with a garbage.
Same thing with nmbd.pid

2. In RedHat 7.0 beta stores samba pid file in 
/var/lock/samba/ directory.
This is wrong, because all scripts 
( like /etc/rc.d/init.d/smb and others)
use standard redhat functions 
like killproc and etc.
All these functions use a fuction
pidofproc from /etc/rc.d/init.d/functions 
which always uses  /var/run/programname.pid 
to read process id from. This way samba scripts 
often do not work correctly. 
Put pid file back to /var/run/ where it should be.

Comment 1 mal 2000-08-18 15:59:12 UTC
Can this problem be fixed before the release?

Also,
when moving pid files to /var/run 
do not fordet to change /etc/logrotate.d/samba
where cat /var/lock/samba/*.pid
should be replaced to 
cat /var/log/smbd.pid /var/log/nmbd.pid


Comment 2 Trond Eivind Glomsrxd 2001-06-18 16:17:16 UTC
samba want to store the pid files in it's lock directory, so I'll let it
continue doing that - the pid files should be specified with pidfile: lines in
the initscript, and this is added in 2.2.0-2.