* [PATCH] clvmd init exit 4 when executed by non-root user
@ 2010-08-12 8:56 Fabio M. Di Nitto
2010-08-12 9:09 ` Milan Broz
0 siblings, 1 reply; 2+ messages in thread
From: Fabio M. Di Nitto @ 2010-08-12 8:56 UTC (permalink / raw)
To: lvm-devel
Once again and hopefully for the last time..
clvmd daemon itself does the right thing when invoked as non-root, by
returning 4.
The patch removes the use daemon function from
/etc/rc.d/init.d/functions that?s unnecessary and has the bad habit to
mask the return codes from the real daemon.
Add a simple and generic check to see if clvmd is executed by root or not.
Our stop/reload/restart paths in the init script are complex and not all
the tools involved in the process are guaranteed to return 4 if executed
by non-root against a process that?s running as root (for example kill
-TERM will return -1 and parsing the output to catch the error is
suboptimal at best).
Fabio
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clvmd_init_exit4.patch
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20100812/76734612/attachment.ksh>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] clvmd init exit 4 when executed by non-root user
2010-08-12 8:56 [PATCH] clvmd init exit 4 when executed by non-root user Fabio M. Di Nitto
@ 2010-08-12 9:09 ` Milan Broz
0 siblings, 0 replies; 2+ messages in thread
From: Milan Broz @ 2010-08-12 9:09 UTC (permalink / raw)
To: lvm-devel
On 08/12/2010 10:56 AM, Fabio M. Di Nitto wrote:
> Once again and hopefully for the last time..
>
> clvmd daemon itself does the right thing when invoked as non-root, by
> returning 4.
>
> The patch removes the use daemon function from
> /etc/rc.d/init.d/functions that?s unnecessary and has the bad habit to
> mask the return codes from the real daemon.
ack.
(and I wonder how is this daemon function is
LSB/FedoraGuidlines/UltimateQuestionOfLife compliant:-)
Milan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-12 9:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-12 8:56 [PATCH] clvmd init exit 4 when executed by non-root user Fabio M. Di Nitto
2010-08-12 9:09 ` Milan Broz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.