Bug 230829 - pidof should not be called with -c as non-root
pidof should not be called with -c as non-root
Product: Fedora
Classification: Fedora
Component: sysvinit (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2007-03-03 04:13 EST by Ville Skyttä
Modified: 2014-03-16 23:05 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.86-16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-16 18:23:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ville Skyttä 2007-03-03 04:13:04 EST
__pids_pidof calls pidof always with -c, which will result in it always failing
to get a pid when run as a non-root user.  This propagates further to some
services not identified as running but having their subsys locked when a normal
user invokes the status action for a service that doesn't have a pid file.

A fix would be to run pidof with -c only when run as root, and without it when
non-root.  Even though __pids_pidof in that case could still produce different
results for root/non-root, I think it would be an improvement over the current
Comment 1 Bill Nottingham 2007-04-16 18:17:50 EDT
Seems better to ignore -c when non-root in SysVinit.
Comment 2 Bill Nottingham 2007-04-16 18:23:59 EDT
Fixed in -16.
Comment 3 Ville Skyttä 2007-04-17 02:26:36 EDT
Hm, but then non-root users can't use the functionality of -c even for processes
they _do_ own?
Comment 4 Bill Nottingham 2007-04-17 10:51:43 EDT
I'm not sure that is a case that users will actually run into.
Comment 5 David Lawrence 2007-06-21 22:11:24 EDT
Package name is now sysvinit in Fedora.

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