Bug 20696 - services won't start if another process of the same name is running
services won't start if another process of the same name is running
Status: CLOSED DUPLICATE of bug 17244
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
: Security
: 19367 19887 20697 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-11 22:51 EST by Eric Smith
Modified: 2014-03-16 22:17 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-13 18:59:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Smith 2000-11-11 22:51:49 EST
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.
Comment 1 Eric Smith 2000-11-11 22:53:39 EST
*** Bug 20697 has been marked as a duplicate of this bug. ***
Comment 2 Eric Smith 2000-11-11 22:56:05 EST
For the example where this affects the Apache web server (httpd), it's not as
trivial to work around as one might expect.  The httpd script does a bunch of
work to determine the right arguments to pass to httpd, so I can't just type
"httpd" to start it up properly.
Comment 3 Bill Nottingham 2000-11-13 01:25:24 EST
*** Bug 19887 has been marked as a duplicate of this bug. ***
Comment 4 Bill Nottingham 2000-11-13 15:46:17 EST
*** Bug 19367 has been marked as a duplicate of this bug. ***
Comment 5 Jon Benson 2000-11-13 18:59:30 EST
Just tracking the UID is not good enough to solve the problem with sendmail. 
Please see my report under 19367.

At the moment I've duplicated the functions file and edited it to suit my needs
then linked it in to my sendmail script.   Not the greatest solution but at
least now I can restart sendmail.
Comment 6 Bill Nottingham 2001-01-30 17:08:29 EST

*** This bug has been marked as a duplicate of 17244 ***

Note You need to log in before you can comment on or make changes to this bug.