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@xxxxxxxxxxxxxx> > Cc: Stephen Smalley <sds@xxxxxxxxxxxxx> > Cc: Eric Paris <eparis@xxxxxxxxxxxxxx> > Cc: James Morris <james.l.morris@xxxxxxxxxx> > Cc: "Serge E. Hallyn" <serge@xxxxxxxxxx> > Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> > Cc: Andrew Perepechko <anserper@xxxxx> > Cc: Jeff Vander Stoep <jeffv@xxxxxxxxxx> > Cc: selinux@xxxxxxxxxxxxx > Cc: Eric Paris <eparis@xxxxxxxxxx> > Cc: Paul Moore <pmoore@xxxxxxxxxx> > Cc: David Howells <dhowells@xxxxxxxxxx> > Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx> > --- > 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 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.