Lines Matching refs:bprm
235 static inline void bprm_clear_caps(struct linux_binprm *bprm)
237 cap_clear(bprm->cred->cap_permitted);
238 bprm->cap_effective = false;
289 struct linux_binprm *bprm,
292 struct cred *new = bprm->cred;
382 static int get_file_caps(struct linux_binprm *bprm, bool *effective)
388 bprm_clear_caps(bprm);
393 if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)
396 dentry = dget(bprm->file->f_dentry);
402 __func__, rc, bprm->filename);
408 rc = bprm_caps_from_vfs_caps(&vcaps, bprm, effective);
411 __func__, rc, bprm->filename);
416 bprm_clear_caps(bprm);
423 * @bprm: The execution parameters, including the proposed creds
426 * constructed by execve(). The proposed creds in @bprm->cred is altered,
429 int cap_bprm_set_creds(struct linux_binprm *bprm)
432 struct cred *new = bprm->cred;
437 ret = get_file_caps(bprm, &effective);
448 warn_setuid_and_fcaps_mixed(bprm->filename);
474 bprm->unsafe & ~LSM_UNSAFE_PTRACE_CAP) {
496 bprm->cap_effective = effective;
514 ret = audit_log_bprm_fcaps(bprm, new, old);
526 * @bprm: The execution parameters
532 * available through @bprm->cred.
534 int cap_bprm_secureexec(struct linux_binprm *bprm)
539 if (bprm->cap_effective)