Lines Matching refs:bprm

299  * @bprm: binprm struct for the process to validate
305 static int aa_xattrs_match(const struct linux_binprm *bprm,
314 if (!bprm || !attach->xattr_count)
320 d = bprm->file->f_path.dentry;
369 * @bprm - binprm structure of transitioning task
384 static struct aa_label *find_attach(const struct linux_binprm *bprm,
432 if (bprm && attach->xattr_count) {
438 ret = aa_xattrs_match(bprm, profile,
551 * @bprm: binprm structure of transitioning task
561 const struct linux_binprm *bprm,
591 new = find_attach(bprm, ns, &profile->base.profiles,
595 new = find_attach(bprm, ns, &ns->base.profiles,
631 const struct linux_binprm *bprm,
645 AA_BUG(!bprm);
648 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer,
657 name = bprm->filename;
662 new = find_attach(bprm, profile->ns,
676 new = x_to_label(profile, bprm, name, perms.xindex, &target,
733 bool stack, const struct linux_binprm *bprm,
746 AA_BUG(!bprm);
759 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer,
767 xname = bprm->filename;
810 const struct linux_binprm *bprm,
820 AA_BUG(!bprm);
826 bprm, buffer, cond, unsafe));
831 profile_transition(subj_cred, profile, bprm,
838 profile_onexec(subj_cred, profile, onexec, stack, bprm,
845 profile_transition(subj_cred, profile, bprm,
857 AA_MAY_ONEXEC, bprm->filename, NULL,
864 * apparmor_bprm_creds_for_exec - Update the new creds on the bprm struct
865 * @bprm: binprm for the exec (NOT NULL)
871 int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm)
881 vfsuid_t vfsuid = i_uid_into_vfsuid(file_mnt_idmap(bprm->file),
882 file_inode(bprm->file));
885 file_inode(bprm->file)->i_mode
890 AA_BUG(!cred_label(bprm->cred));
893 label = aa_get_newest_label(cred_label(bprm->cred));
902 if ((bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS) && !unconfined(label) &&
916 bprm, buffer, &cond, &unsafe);
919 profile_transition(subj_cred, profile, bprm,
940 if ((bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS) &&
948 if (bprm->unsafe & LSM_UNSAFE_SHARE) {
953 if (bprm->unsafe & (LSM_UNSAFE_PTRACE)) {
955 error = may_change_ptraced_domain(bprm->cred, new, &info);
963 "label=", bprm->filename);
967 bprm->secureexec = 1;
974 "bits. %s label=", bprm->filename);
978 bprm->per_clear |= PER_CLEAR_ON_SETID;
980 aa_put_label(cred_label(bprm->cred));
982 set_cred_label(bprm->cred, new);
994 bprm->filename, NULL, new,