Lines Matching refs:bprm
616 struct linux_binprm *bprm, in bprm_caps_from_vfs_caps() argument
620 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps()
752 static int get_file_caps(struct linux_binprm *bprm, const struct file *file, in get_file_caps() argument
758 cap_clear(bprm->cred->cap_permitted); in get_file_caps()
779 bprm->filename); in get_file_caps()
785 rc = bprm_caps_from_vfs_caps(&vcaps, bprm, effective, has_fcap); in get_file_caps()
789 cap_clear(bprm->cred->cap_permitted); in get_file_caps()
817 static void handle_privileged_root(struct linux_binprm *bprm, bool has_fcap, in handle_privileged_root() argument
821 struct cred *new = bprm->cred; in handle_privileged_root()
831 warn_setuid_and_fcaps_mixed(bprm->filename); in handle_privileged_root()
914 int cap_bprm_creds_from_file(struct linux_binprm *bprm, const struct file *file) in cap_bprm_creds_from_file() argument
918 struct cred *new = bprm->cred; in cap_bprm_creds_from_file()
926 ret = get_file_caps(bprm, file, &effective, &has_fcap); in cap_bprm_creds_from_file()
932 handle_privileged_root(bprm, has_fcap, &effective, root_uid); in cap_bprm_creds_from_file()
936 bprm->per_clear |= PER_CLEAR_ON_SETID; in cap_bprm_creds_from_file()
946 ((bprm->unsafe & ~LSM_UNSAFE_PTRACE) || in cap_bprm_creds_from_file()
950 (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS)) { in cap_bprm_creds_from_file()
984 ret = audit_log_bprm_fcaps(bprm, new, old); in cap_bprm_creds_from_file()
999 bprm->secureexec = 1; in cap_bprm_creds_from_file()