Bug 230829 - pidof should not be called with -c as non-root
Summary: pidof should not be called with -c as non-root
Alias: None
Product: Fedora
Classification: Fedora
Component: sysvinit   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2007-03-03 09:13 UTC by Ville Skyttä
Modified: 2014-03-17 03:05 UTC (History)
1 user (show)

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

Attachments (Terms of Use)

Description Ville Skyttä 2007-03-03 09:13:04 UTC
__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 22:17:50 UTC
Seems better to ignore -c when non-root in SysVinit.

Comment 2 Bill Nottingham 2007-04-16 22:23:59 UTC
Fixed in -16.

Comment 3 Ville Skyttä 2007-04-17 06:26:36 UTC
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 14:51:43 UTC
I'm not sure that is a case that users will actually run into.

Comment 5 David Lawrence 2007-06-22 02:11:24 UTC
Package name is now sysvinit in Fedora.

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