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>
This commit is contained in:

committed by
Paul Moore

parent
8794d78390
commit
89d4d7c88d
@@ -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) {
|
||||
|
Reference in New Issue
Block a user