Lines Matching refs:newpolicy

2140 				struct selinux_policy *newpolicy);
2187 struct selinux_policy *oldpolicy, *newpolicy = load_state->policy; in selinux_policy_commit() local
2196 if (oldpolicy->policydb.mls_enabled && !newpolicy->policydb.mls_enabled) in selinux_policy_commit()
2198 else if (!oldpolicy->policydb.mls_enabled && newpolicy->policydb.mls_enabled) in selinux_policy_commit()
2204 newpolicy->latest_granting = oldpolicy->latest_granting + 1; in selinux_policy_commit()
2206 newpolicy->latest_granting = 1; in selinux_policy_commit()
2207 seqno = newpolicy->latest_granting; in selinux_policy_commit()
2212 rcu_assign_pointer(state->policy, newpolicy); in selinux_policy_commit()
2215 rcu_assign_pointer(state->policy, newpolicy); in selinux_policy_commit()
2219 security_load_policycaps(newpolicy); in selinux_policy_commit()
2255 struct selinux_policy *newpolicy, *oldpolicy; in security_load_policy() local
2260 newpolicy = kzalloc(sizeof(*newpolicy), GFP_KERNEL); in security_load_policy()
2261 if (!newpolicy) in security_load_policy()
2264 newpolicy->sidtab = kzalloc(sizeof(*newpolicy->sidtab), GFP_KERNEL); in security_load_policy()
2265 if (!newpolicy->sidtab) { in security_load_policy()
2270 rc = policydb_read(&newpolicy->policydb, fp); in security_load_policy()
2274 newpolicy->policydb.len = len; in security_load_policy()
2275 rc = selinux_set_mapping(&newpolicy->policydb, secclass_map, in security_load_policy()
2276 &newpolicy->map); in security_load_policy()
2280 rc = policydb_load_isids(&newpolicy->policydb, newpolicy->sidtab); in security_load_policy()
2288 load_state->policy = newpolicy; in security_load_policy()
2297 rc = security_preserve_bools(oldpolicy, newpolicy); in security_load_policy()
2315 convert_data->args.newp = &newpolicy->policydb; in security_load_policy()
2318 convert_data->sidtab_params.target = newpolicy->sidtab; in security_load_policy()
2328 load_state->policy = newpolicy; in security_load_policy()
2335 sidtab_destroy(newpolicy->sidtab); in security_load_policy()
2337 kfree(newpolicy->map.mapping); in security_load_policy()
2339 policydb_destroy(&newpolicy->policydb); in security_load_policy()
2341 kfree(newpolicy->sidtab); in security_load_policy()
2343 kfree(newpolicy); in security_load_policy()
3030 struct selinux_policy *newpolicy, *oldpolicy; in security_set_bools() local
3044 newpolicy = kmemdup(oldpolicy, sizeof(*newpolicy), GFP_KERNEL); in security_set_bools()
3045 if (!newpolicy) in security_set_bools()
3052 rc = cond_policydb_dup(&newpolicy->policydb, &oldpolicy->policydb); in security_set_bools()
3054 kfree(newpolicy); in security_set_bools()
3061 int old_state = newpolicy->policydb.bool_val_to_struct[i]->state; in security_set_bools()
3067 sym_name(&newpolicy->policydb, SYM_BOOLS, i), in security_set_bools()
3072 newpolicy->policydb.bool_val_to_struct[i]->state = new_state; in security_set_bools()
3077 evaluate_cond_nodes(&newpolicy->policydb); in security_set_bools()
3080 newpolicy->latest_granting = oldpolicy->latest_granting + 1; in security_set_bools()
3081 seqno = newpolicy->latest_granting; in security_set_bools()
3084 rcu_assign_pointer(state->policy, newpolicy); in security_set_bools()
3125 struct selinux_policy *newpolicy) in security_preserve_bools() argument
3136 booldatum = symtab_search(&newpolicy->policydb.p_bools, in security_preserve_bools()
3141 evaluate_cond_nodes(&newpolicy->policydb); in security_preserve_bools()