Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 230829 - pidof should not be called with -c as non-root
Summary: pidof should not be called with -c as non-root
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: sysvinit
Version: rawhide
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2007-04-16 22:23:59 UTC


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
situation.

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.