All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-security-module@vger.kernel.org,
	Stephen Smalley <sds@tycho.nsa.gov>,
	Eric Paris <eparis@parisplace.org>,
	James Morris <james.l.morris@oracle.com>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Andrew Perepechko <anserper@ya.ru>,
	Jeff Vander Stoep <jeffv@google.com>,
	selinux@tycho.nsa.gov, Eric Paris <eparis@redhat.com>,
	David Howells <dhowells@redhat.com>
Subject: Re: [PATCH] security/selinux: Change bool variable name to index.
Date: Thu, 14 Apr 2016 08:30:01 -0700 (PDT)	[thread overview]
Message-ID: <1482426.kGzoLHui53@sifl> (raw)
In-Reply-To: <1460644857-29218-1-git-send-email-prarit@redhat.com>

On Thursday, April 14, 2016 10:40:57 AM Prarit Bhargava wrote:
> security_get_bool_value(int bool) argument "bool" conflicts with in-kernel
> macros such as BUILD_BUG().  This patch changes this to index which isn't
> a type.
> 
> Cc: Paul Moore <paul@paul-moore.com>
> Cc: Stephen Smalley <sds@tycho.nsa.gov>
> Cc: Eric Paris <eparis@parisplace.org>
> Cc: James Morris <james.l.morris@oracle.com>
> Cc: "Serge E. Hallyn" <serge@hallyn.com>
> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Cc: Andrew Perepechko <anserper@ya.ru>
> Cc: Jeff Vander Stoep <jeffv@google.com>
> Cc: selinux@tycho.nsa.gov
> Cc: Eric Paris <eparis@redhat.com>
> Cc: Paul Moore <pmoore@redhat.com>
> Cc: David Howells <dhowells@redhat.com>
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> ---
>  security/selinux/include/conditional.h |    2 +-
>  security/selinux/ss/services.c         |    6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)

Looks good to me, merged into the SELinux next branch.

> diff --git a/security/selinux/include/conditional.h
> b/security/selinux/include/conditional.h index 67ce7a8..ff4fddc 100644
> --- a/security/selinux/include/conditional.h
> +++ b/security/selinux/include/conditional.h
> @@ -17,6 +17,6 @@ int security_get_bools(int *len, char ***names, int
> **values);
> 
>  int security_set_bools(int len, int *values);
> 
> -int security_get_bool_value(int bool);
> +int security_get_bool_value(int index);
> 
>  #endif
> diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
> index ebda973..89df646 100644
> --- a/security/selinux/ss/services.c
> +++ b/security/selinux/ss/services.c
> @@ -2696,7 +2696,7 @@ out:
>  	return rc;
>  }
> 
> -int security_get_bool_value(int bool)
> +int security_get_bool_value(int index)
>  {
>  	int rc;
>  	int len;
> @@ -2705,10 +2705,10 @@ int security_get_bool_value(int bool)
> 
>  	rc = -EFAULT;
>  	len = policydb.p_bools.nprim;
> -	if (bool >= len)
> +	if (index >= len)
>  		goto out;
> 
> -	rc = policydb.bool_val_to_struct[bool]->state;
> +	rc = policydb.bool_val_to_struct[index]->state;
>  out:
>  	read_unlock(&policy_rwlock);
>  	return rc;

-- 
paul moore
www.paul-moore.com

      parent reply	other threads:[~2016-04-14 15:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 14:40 [PATCH] security/selinux: Change bool variable name to index Prarit Bhargava
2016-04-14 14:51 ` David Howells
2016-04-14 15:30 ` Paul Moore [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=1482426.kGzoLHui53@sifl \
    --to=paul@paul-moore.com \
    --cc=anserper@ya.ru \
    --cc=dhowells@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=eparis@redhat.com \
    --cc=james.l.morris@oracle.com \
    --cc=jeffv@google.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=prarit@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=serge@hallyn.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.