The deamon() function in /etc/rc.d/init.d/functions will not start a
service if there is an existing process with the same name, becuase
pidofproc() finds it. For instance, a user of my system runs a custom
httpd process, completely independent of the installed Apache server. If I
issue the command "/etc/rc.d/init.d/httpd restart", it will fail, without
giving any indication that there was a problem.
This is a possible Denial of Service attack. An unprivileged user can
interfere with the operation of any system services managed through
initscripts that uses the deamon() function.
Suggested fix: add an argument to daemon() and pidofproc() for the
expected UID of the process, perhaps defaulting to root. Or, by default
allow it to match only UIDs under 100.
*** This bug has been marked as a duplicate of 20696 ***
Sorry, submitted twice by accident