From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] clvmd init exit 4 when executed by non-root user
Date: Thu, 12 Aug 2010 10:56:17 +0200 [thread overview]
Message-ID: <4C63B731.90407@redhat.com> (raw)
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>
next reply other threads:[~2010-08-12 8:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 8:56 Fabio M. Di Nitto [this message]
2010-08-12 9:09 ` [PATCH] clvmd init exit 4 when executed by non-root user Milan Broz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C63B731.90407@redhat.com \
--to=fdinitto@redhat.com \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.