summaryrefslogtreecommitdiff
path: root/security/selinux/ss/services.c
diff options
context:
space:
mode:
authorOndrej Mosnacek <omosnace@redhat.com>2020-02-03 14:27:23 +0300
committerPaul Moore <paul@paul-moore.com>2020-02-12 05:50:26 +0300
commit89d4d7c88d2b4f252adb434a28ea9b84d629aeb1 (patch)
treedc1a00d994efd42be540d6e63f170aa6eee0d8fa /security/selinux/ss/services.c
parent8794d7839038fc018e51d0afbf309b71069d9691 (diff)
downloadlinux-89d4d7c88d2b4f252adb434a28ea9b84d629aeb1.tar.xz
selinux: generalize evaluate_cond_node()
Both callers iterate the cond_list and call it for each node - turn it into evaluate_cond_nodes(), which does the iteration for them. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/services.c')
-rw-r--r--security/selinux/ss/services.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 1e652d6ed8cd..57b2c6252799 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -2957,8 +2957,7 @@ int security_set_bools(struct selinux_state *state, u32 len, int *values)
policydb->bool_val_to_struct[i]->state = 0;
}
- for (i = 0; i < policydb->cond_list_len; i++)
- evaluate_cond_node(policydb, &policydb->cond_list[i]);
+ evaluate_cond_nodes(policydb);
seqno = ++state->ss->latest_granting;
rc = 0;
@@ -3011,8 +3010,7 @@ static int security_preserve_bools(struct selinux_state *state,
if (booldatum)
booldatum->state = bvalues[i];
}
- for (i = 0; i < policydb->cond_list_len; i++)
- evaluate_cond_node(policydb, &policydb->cond_list[i]);
+ evaluate_cond_nodes(policydb);
out:
if (bnames) {