* [PATCH] security/selinux: Change bool variable name to index.
@ 2016-04-14 14:40 Prarit Bhargava
2016-04-14 14:51 ` David Howells
2016-04-14 15:30 ` Paul Moore
0 siblings, 2 replies; 3+ messages in thread
From: Prarit Bhargava @ 2016-04-14 14:40 UTC (permalink / raw)
To: linux-security-module
Cc: Prarit Bhargava, Paul Moore, Stephen Smalley, Eric Paris,
James Morris, Serge E. Hallyn, Rasmus Villemoes,
Andrew Perepechko, Jeff Vander Stoep, selinux, Eric Paris,
Paul Moore, David Howells
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(-)
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;
--
1.7.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] security/selinux: Change bool variable name to index.
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
1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2016-04-14 14:51 UTC (permalink / raw)
To: Prarit Bhargava
Cc: dhowells, linux-security-module, Paul Moore, Stephen Smalley,
Eric Paris, James Morris, Serge E. Hallyn, Rasmus Villemoes,
Andrew Perepechko, Jeff Vander Stoep, selinux, Eric Paris,
Paul Moore
Prarit Bhargava <prarit@redhat.com> 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.
>
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] security/selinux: Change bool variable name to index.
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
1 sibling, 0 replies; 3+ messages in thread
From: Paul Moore @ 2016-04-14 15:30 UTC (permalink / raw)
To: Prarit Bhargava
Cc: linux-security-module, Stephen Smalley, Eric Paris, James Morris,
Serge E. Hallyn, Rasmus Villemoes, Andrew Perepechko,
Jeff Vander Stoep, selinux, Eric Paris, David Howells
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-14 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.