status_of_proc() calls pidofproc() which calls kill, requiring ownership privileges on the process
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb (Ubuntu) |
Fix Released
|
Medium
|
Dustin Kirkland |
Bug Description
Binary package hint: lsb
The status_of_proc() function is intended to provide a reusable framework for individual init scripts to provide a "status" action, whereby users and query the init script and determine if a given service is running.
The status_of_proc() function calls the pidofproc() function. This function will first attempt to locate a pidfile, and if found, will call "kill -0" to send a signal to the process. The operation requires that the euid of the user querying the status of the service either match that of the service, or of course be root.
Non-root, non-owning users should be able to query the status of services. For this reason, the "kill -0" test is not going to work.
Further down in the pidofproc() function, it falls back upon calling /bin/pidof. This is actually the functionality that we need in the status_of_proc() function.
The attached patch adjusts the body of the status_of_proc() function to use /bin/pidof such that any user can query the status of system services.
I will push this patch to Debian and link the bug number to this report.
:-Dustin
Related branches
Changed in lsb: | |
assignee: | nobody → kirkland |
importance: | Undecided → Medium |
status: | New → In Progress |
Patch. Requesting sponsorship.
:-Dustin