diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/include/conditional.h | 2 | ||||
-rw-r--r-- | 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 67ce7a8d8301..ff4fddca9050 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); | |||
17 | 17 | ||
18 | int security_set_bools(int len, int *values); | 18 | int security_set_bools(int len, int *values); |
19 | 19 | ||
20 | int security_get_bool_value(int bool); | 20 | int security_get_bool_value(int index); |
21 | 21 | ||
22 | #endif | 22 | #endif |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index ebda97333f1b..89df64672b89 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -2696,7 +2696,7 @@ out: | |||
2696 | return rc; | 2696 | return rc; |
2697 | } | 2697 | } |
2698 | 2698 | ||
2699 | int security_get_bool_value(int bool) | 2699 | int security_get_bool_value(int index) |
2700 | { | 2700 | { |
2701 | int rc; | 2701 | int rc; |
2702 | int len; | 2702 | int len; |
@@ -2705,10 +2705,10 @@ int security_get_bool_value(int bool) | |||
2705 | 2705 | ||
2706 | rc = -EFAULT; | 2706 | rc = -EFAULT; |
2707 | len = policydb.p_bools.nprim; | 2707 | len = policydb.p_bools.nprim; |
2708 | if (bool >= len) | 2708 | if (index >= len) |
2709 | goto out; | 2709 | goto out; |
2710 | 2710 | ||
2711 | rc = policydb.bool_val_to_struct[bool]->state; | 2711 | rc = policydb.bool_val_to_struct[index]->state; |
2712 | out: | 2712 | out: |
2713 | read_unlock(&policy_rwlock); | 2713 | read_unlock(&policy_rwlock); |
2714 | return rc; | 2714 | return rc; |