[Pkg-sysvinit-devel] Bug#353638: sysvinit: pidof/killall5 ignores
pathnames (contrary to the manpage!)
Christoph Biedl
cbiedl at gmx.de
Mon Feb 20 00:52:22 UTC 2006
Package: sysvinit
Version: 2.86.ds1-1
Severity: important
The manpage for pidof states:
| When pidof is invoked with a full pathname to the program it should
| find the pid of, it is reasonably safe. Otherwise it is possible that
| it returns pids of running programs that happen to have the same name
| as the program you#re after but are actually other programs.
Well, that's not correct.
How to repeat: Create a small program:
--- test.c -------------
int main (int argc, char *argv[]) {
sleep (60);
return 0;
}
-----------------------
and compile it to the name of an already running program e.g. syslog-ng:
# gcc test.c -o syslog-ng
# ./syslog-ng
and watch the output of
# pidof /sbin/syslog-ng
before you start this program and while it's running.
Appearently pidof ignores the path entirely as I can also test
# pidof /nonexistant/syslog-ng
and still get results.
Severity was set to important as this is not expected behaviour and
might break programs and daemons. FYI, The problem still exists in
etch (2.86.ds1-4).
Christoph
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.15
Locale: LANG=de_DE.UTF-8 at euro, LC_CTYPE=de_DE.UTF-8 at euro (charmap=UTF-8)
Versions of packages sysvinit depends on:
ii coreutils 5.2.1-2 The GNU core utilities
ii initscripts 2.86.ds1-1 Standard scripts needed for bootin
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii sysv-rc 2.86.ds1-1 Standard boot mechanism using syml
-- no debconf information
More information about the Pkg-sysvinit-devel
mailing list