Summary: | extra_commands and extra_started_commands do not check for superuser access | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Gordon Pettey <petteyg359> |
Component: | OpenRC | Assignee: | OpenRC Team <openrc> |
Status: | RESOLVED INVALID | ||
Severity: | major | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Gordon Pettey
2012-12-06 03:40:01 UTC
(In reply to comment #0) > openrc version: 0.11.6 > > Expect that a normal user running init scripts would fail. This works as > expected for start/stop, but extra_commands and extra_started_commands do > not produce a "superuser access required" error. The status command doesn't require super user access, and there is no way of knowing whether or not any specific command you might add to extra_* requires superuser access. The examples you site are not because of restrictions within OpenRC; the errors happen because the specific commands you are running try to access files they do not have permission to access. Given that, I'm not sure whether we can do anything in OpenRC or not. As stated above, this is not really a bug in OpenRC, but in the init scripts themselves. The command functions themselves are responsible for checking permissions on files they need to access. We could consider a helper for this, but that might be a topic that should be discussed somewhere else instead of on this bug. |