From: Michael C Thompson <thompsmc@us.ibm.com>
To: Michael C Thompson <thompsmc@us.ibm.com>
Cc: SE Linux <selinux@tycho.nsa.gov>, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [PATCH 2/4] make newrole suid
Date: Mon, 09 Oct 2006 13:27:46 -0500 [thread overview]
Message-ID: <452A94A2.8040905@us.ibm.com> (raw)
In-Reply-To: <4526D5C6.3090505@us.ibm.com>
Michael C Thompson wrote:
> This is the 2nd of 4 patches.
> This patch applies against policycoreutils-1.30.30-1.
>
> Changes:
> * main is changed in the following ways:
> - remove the duplicated functionality for patch 1/4
> - set to call the new functions
> - introduces better error handling and cleanup paths
>
> Signed-off-by: Michael Thompson <thompsmc@us.ibm.com>
>
>
>
> ------------------------------------------------------------------------
>
> diff -Naur policycoreutils-1.30.30/newrole/newrole.c policycoreutils-1.30.30.suid/newrole/newrole.c
> --- policycoreutils-1.30.30/newrole/newrole.c 2006-10-06 17:01:10.000000000 -0500
> +++ policycoreutils-1.30.30.suid/newrole/newrole.c 2006-10-06 17:00:18.000000000 -0500
<snip>
> if (!is_selinux_enabled()) {
> - fprintf(stderr,
> - _
> - ("Sorry, newrole may be used only on a SELinux kernel.\n"));
> - exit(-1);
> + fprintf(stderr, _("Sorry, newrole may be used only on "
> + "a SELinux kernel.\n"));
> + return -1;
> }
> - enforcing = security_getenforce();
> - if (enforcing < 0) {
> +
> + if (security_getenforce()) {
> fprintf(stderr, _("Could not determine enforcing mode.\n"));
> - exit(-1);
> + return -1;
> }
Rather embarrassing, but this was overlooked by myself before I sent
this patch out. It's been fixed on my side.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
prev parent reply other threads:[~2006-10-09 18:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 22:16 [PATCH 2/4] make newrole suid Michael C Thompson
2006-10-09 18:27 ` Michael C Thompson [this message]
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=452A94A2.8040905@us.ibm.com \
--to=thompsmc@us.ibm.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/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.