On Mon, 2005-04-18 at 19:01 +0200, Phil Knirsch wrote: > What would you except? Surely not that your sshd on the remote system > suddenly stops. But unfortunately thats what then happens because > /sbin/service stop calls killproc which first tries to find > /var/lock/subsys/FOO, then some other checks and if it didn't find > anything in the end it calls pidof FOO. And that just goes through /proc > and if it finds a matching name, in that case the sshd of the remote > system it happily uses that one to kill. Bang! Your sshd is gone. > Imagine that with a system 100s of miles away... Actually this example is no longer valid because the openssh sshd init script was patched so it doesn't stop sshd session processes, only the parent one with the pid in /var/run/sshd.pid > 3) Fix the inbetweener: killproc() in initrc functions. So basically > keep pidof as it is but make the check mentioned in 2) in killproc() > instead. A question unrelated to the chroot problem is if there shouldn't be also a killprocpidfile function which would only kill process with id specified in /var/run/FOO.pid. -- Tomas Mraz <tmraz@xxxxxxxxxx>