Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345685 - net-fs/samba-3.4.9 init script does not use pidfiles
Summary: net-fs/samba-3.4.9 init script does not use pidfiles
Status: RESOLVED DUPLICATE of bug 302123
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-15 23:08 UTC by Walter
Modified: 2010-12-20 20:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter 2010-11-15 23:08:58 UTC
The init script calls start-stop-daemon to start and stop the daemons without using pidfiles.  This means that on systems with multiple daemon instances (for example, where a user has made their own secondary init script, see: , or where the user is running samba within linux container guests), the stop call will kill all instances instead of just one.  

PID files should always be used in init scripts where daemon support is available.  

Reproducible: Always

Steps to Reproduce:
1. Start the daemon: /etc/init.d/samba start
2. Start another copy of the daemon with another configuration file, or in a linux container
3. Stop the daemon: /etc/init.d/samba stop

Actual Results:  
All daemons die, or wrong daemon dies.

Expected Results:  
Only correct deamon dies.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-11-16 06:32:28 UTC
Your bug is similar to bug #302123 but dunno if it's really a dupe...

PID-files cannot be used because each connection established to the samba server creates a new smbd process. So when stopping samba via init script through the PID-file only the parent smbd would be stopped but all child smbd processes would still be left running which is IMHO not acceptable.
Comment 2 Walter 2010-11-16 15:27:46 UTC
If this is really the case then some method to detect and kill all children should be used.  If necessary, this could be pushed upstream to start-stop-daemon people, it's only some /proc logic anyway, right?
Comment 3 Víctor Ostorga (RETIRED) gentoo-dev 2010-12-20 20:39:01 UTC

*** This bug has been marked as a duplicate of bug 302123 ***