Lines Matching full:new
38 * to trace the new domain
456 * The new match isn't more specific in find_attach()
569 struct aa_label *new = NULL; in x_to_label() local
584 new = x_table_lookup(profile, xindex, lookupname); in x_to_label()
592 new = find_attach(bprm, ns, &profile->base.profiles, in x_to_label()
596 new = find_attach(bprm, ns, &ns->base.profiles, in x_to_label()
602 if (!new) { in x_to_label()
609 new = aa_get_newest_label(&profile->label); in x_to_label()
611 new = aa_get_newest_label(ns_unconfined(profile->ns)); in x_to_label()
616 if (new && stack) { in x_to_label()
618 struct aa_label *base = new; in x_to_label()
620 new = aa_label_parse(base, stack, GFP_KERNEL, true, false); in x_to_label()
621 if (IS_ERR(new)) in x_to_label()
622 new = NULL; in x_to_label()
627 return new; in x_to_label()
638 struct aa_label *new = NULL; in profile_transition() local
657 new = aa_get_newest_label(&profile->label); in profile_transition()
664 new = find_attach(bprm, profile->ns, in profile_transition()
666 if (new) { in profile_transition()
667 AA_DEBUG("unconfined attached to new label"); in profile_transition()
668 return new; in profile_transition()
678 new = x_to_label(profile, bprm, name, perms.xindex, &target, in profile_transition()
680 if (new && new->proxy == profile->label.proxy && info) { in profile_transition()
683 } else if (!new) { in profile_transition()
703 new = &new_profile->label; in profile_transition()
710 if (!new) in profile_transition()
718 aa_label_printk(new, GFP_KERNEL); in profile_transition()
726 target, new, in profile_transition()
728 if (!new || nonewprivs) { in profile_transition()
729 aa_put_label(new); in profile_transition()
733 return new; in profile_transition()
820 struct aa_label *new; in handle_onexec() local
835 new = fn_label_build_in_ns(label, profile, GFP_KERNEL, in handle_onexec()
841 if (new) in handle_onexec()
842 return new; in handle_onexec()
855 * apparmor_bprm_creds_for_exec - Update the new creds on the bprm struct
865 struct aa_label *label, *new = NULL; in apparmor_bprm_creds_for_exec() local
887 * Detect no new privs being set, and store the label it in apparmor_bprm_creds_for_exec()
906 new = handle_onexec(subj_cred, label, ctx->onexec, ctx->token, in apparmor_bprm_creds_for_exec()
909 new = fn_label_build(label, profile, GFP_KERNEL, in apparmor_bprm_creds_for_exec()
914 AA_BUG(!new); in apparmor_bprm_creds_for_exec()
915 if (IS_ERR(new)) { in apparmor_bprm_creds_for_exec()
916 error = PTR_ERR(new); in apparmor_bprm_creds_for_exec()
918 } else if (!new) { in apparmor_bprm_creds_for_exec()
925 * of the confinement when the task entered no new privs. in apparmor_bprm_creds_for_exec()
933 !aa_label_is_unconfined_subset(new, ctx->nnp)) { in apparmor_bprm_creds_for_exec()
935 info = "no new privs"; in apparmor_bprm_creds_for_exec()
945 /* TODO: test needs to be profile of label to new */ in apparmor_bprm_creds_for_exec()
946 error = may_change_ptraced_domain(bprm->cred, new, &info); in apparmor_bprm_creds_for_exec()
955 aa_label_printk(new, GFP_KERNEL); in apparmor_bprm_creds_for_exec()
961 if (label->proxy != new->proxy) { in apparmor_bprm_creds_for_exec()
966 aa_label_printk(new, GFP_KERNEL); in apparmor_bprm_creds_for_exec()
973 set_cred_label(bprm->cred, new); in apparmor_bprm_creds_for_exec()
985 bprm->filename, NULL, new, in apparmor_bprm_creds_for_exec()
987 aa_put_label(new); in apparmor_bprm_creds_for_exec()
1055 struct aa_label *new; in change_hat() local
1136 new = fn_label_build_in_ns(label, profile, GFP_KERNEL, in change_hat()
1140 if (!new) { in change_hat()
1144 } /* else if (IS_ERR) build_change_hat has logged error so return new */ in change_hat()
1146 return new; in change_hat()
1170 struct aa_label *label, *previous, *new = NULL, *target = NULL; in aa_change_hat() local
1182 * Detect no new privs being set, and store the label it in aa_change_hat()
1198 new = change_hat(subj_cred, label, hats, count, flags); in aa_change_hat()
1199 AA_BUG(!new); in aa_change_hat()
1200 if (IS_ERR(new)) { in aa_change_hat()
1201 error = PTR_ERR(new); in aa_change_hat()
1202 new = NULL; in aa_change_hat()
1207 /* target cred is the same as current except new label */ in aa_change_hat()
1208 error = may_change_ptraced_domain(subj_cred, new, &info); in aa_change_hat()
1213 * no new privs prevents domain transitions that would in aa_change_hat()
1217 !aa_label_is_unconfined_subset(new, ctx->nnp)) { in aa_change_hat()
1227 target = new; in aa_change_hat()
1228 error = aa_set_current_hat(new, token); in aa_change_hat()
1234 * no new privs prevents domain transitions that would in aa_change_hat()
1258 aa_put_label(new); in aa_change_hat()
1310 * Change to new profile @name. Unlike with hats, there is no way
1320 struct aa_label *label, *new = NULL, *target = NULL; in aa_change_profile() local
1335 * Detect no new privs being set, and store the label it in aa_change_profile()
1455 new = fn_label_build_in_ns(label, profile, GFP_KERNEL, in aa_change_profile()
1459 * no new privs prevents domain transitions that would in aa_change_profile()
1463 !aa_label_is_unconfined_subset(new, ctx->nnp)) { in aa_change_profile()
1474 new = aa_label_merge(label, target, GFP_KERNEL); in aa_change_profile()
1475 if (IS_ERR_OR_NULL(new)) { in aa_change_profile()
1477 if (!new) in aa_change_profile()
1480 error = PTR_ERR(new); in aa_change_profile()
1481 new = NULL; in aa_change_profile()
1485 error = aa_replace_current_label(new); in aa_change_profile()
1487 if (new) { in aa_change_profile()
1488 aa_put_label(new); in aa_change_profile()
1489 new = NULL; in aa_change_profile()
1500 NULL, new ? new : target, in aa_change_profile()
1504 aa_put_label(new); in aa_change_profile()