All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Chris PeBenito <cpebenito@tresys.com>
Cc: SELinux@tycho.nsa.gov
Subject: Re: [PATCH 2/2] Update SELinux policy capability to always check peer class.
Date: Fri, 08 Jun 2012 13:36:44 -0400	[thread overview]
Message-ID: <4945649.oOvInFXCG6@sifl> (raw)
In-Reply-To: <1339093682-5113-2-git-send-email-cpebenito@tresys.com>

On Thursday, June 07, 2012 02:28:02 PM Chris PeBenito wrote:
> Update the always_check_network policy capability which, when enabled,
> treats peer labeling as enabled, even if there is no Netlabel or
> labeled IPSEC configuration.
> 
> Signed-off-by: Chris PeBenito <cpebenito@tresys.com>

...

> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index ec7151b..e8f612e 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -149,6 +149,24 @@ static int selinux_secmark_enabled(void)
> +static int selinux_peerlbl_enabled(void)
> +{
> +	if (selinux_policycap_alwaysnetwork)
> +		return 1;
> +	else
> +		return (netlbl_enabled() || selinux_xfrm_enabled());
> +}

Why not make this more consistent?

  return (selinux_policycap_alwaysnetwork || ...

-- 
paul moore
www.paul-moore.com


--
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.

  reply	other threads:[~2012-06-08 17:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07 18:28 [PATCH 1/2] Add SELinux policy capability for always checking packet class Chris PeBenito
2012-06-07 18:28 ` [PATCH 2/2] Update SELinux policy capability to always check peer class Chris PeBenito
2012-06-08 17:36   ` Paul Moore [this message]
2012-06-08 18:29     ` Christopher J. PeBenito
2012-06-08 17:36 ` [PATCH 1/2] Add SELinux policy capability for always checking packet class Paul Moore
2012-06-08 18:28   ` Christopher J. PeBenito
2012-06-08 18:55     ` Paul Moore
2012-06-08 19:43       ` Christopher J. PeBenito
2012-06-08 19:33     ` Casey Schaufler
  -- strict thread matches above, loose matches on Subject: below --
2012-06-06 17:28 Chris PeBenito
2012-06-06 17:28 ` [PATCH 2/2] Update SELinux policy capability to always check peer class Chris PeBenito
2012-06-07 14:28   ` Paul Moore
2012-06-07 15:27     ` Christopher J. PeBenito
2012-06-07 15:33       ` Paul Moore
2012-06-07 16:08         ` Christopher J. PeBenito
2012-06-07 16:52           ` Paul Moore
2012-06-07 17:43             ` Eric Paris

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=4945649.oOvInFXCG6@sifl \
    --to=paul@paul-moore.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=cpebenito@tresys.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.