Re: initscripts proposal conflict?
Hi,
On Wed, Jul 19, Guilherme Manika wrote:
>
> The init scripts proposal seems to be self-conflicting to
> me. sysinit/initactions.sgml says:
>
> "Init files should ensure that they will behave sensibly if invoked
> with start when the service is already running, or with stop when it
> isn't, and that they don't kill unfortunately-named user
> processes. (...)"
>
> sysinit/initfunctions.sgml defines a algorithm for pidofproc and
> killproc that does not seem to comply with this. If the basename.pid
> file is not available, it uses pidof to find the running process.
> However, pidof(8)'s man page says that it is not safe if all it gets
> is the basename of the process (it may return unfortunately-named user
> processes otherwise). The usage of ps in case pidof fails is also
> broken in the same sense.
>
> Possible solutions: either require that killproc and pidofproc get a
> complete path as an argument, and usage of 'ps' as one of the possible
> ways to get the pid of a process is dropped; or define that
> start-stop-daemon should be present and use it (I believe s-s-d
> doesn't have the problems described).
I think killproc and pidofproc should get the complete path as an
argument. We do it for SuSE Linux since a long time, it is the only
secure way not to kill the wrong process.
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE GmbH Schanzaeckerstr. 10 90443 Nuernberg
Linux is like a Vorlon. It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.
Reply to: