Package: dpkg
Version: 1.13.16
Severity: normal
"Options (at least one of --exec|--pidfile|--user is required):\n"
...
if (!execname && !pidfile && !userspec && !cmdname)
badusage("need at least one of --exec, --pidfile, --user or --name");
using only pidfile is halfway-safe, since it would often require
inconsistent code to kill a wrong process. Either the PID listed in
the pidfile crashes, or the initscripts didn't remove/update the
pidfile. The unsafe part is when an admin manually stops the process,
without updating the pidfile, and another process runs with that pid,
then gets killed.
using only userspec is safe, in the cases where there is a dedicated
user which runs only a very small number of programs; hopefully people
using this are being careful; using --user root only could be pretty
much catastrophic.
using exec is safe, in the case that the given name is something which
is meant to be run exactly once, and can't be usefully run by a user;
--exec /usr/sbin/foo should be the typical usage (where foo is meant
to be run exactly once).
IMO running with --name only is unsafe, since arbitrary user processes
can be unintentionally killed. Add --user, which will usually be
"root" or a dedicated UID, and it is pretty safe, since those users
typically run only a small number of processes, and not often
processes with duplicate names.
So I wonder if the code should be changed, instead of the
documentation.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]