/security/apparmor/ |
D | domain.c | 310 static int aa_xattrs_match(const struct linux_binprm *bprm, in aa_xattrs_match() argument 319 if (!bprm || !profile->xattr_count) in aa_xattrs_match() 325 d = bprm->file->f_path.dentry; in aa_xattrs_match() 387 static struct aa_label *find_attach(const struct linux_binprm *bprm, in find_attach() argument 430 if (bprm && profile->xattr_count) { in find_attach() 436 ret = aa_xattrs_match(bprm, profile, in find_attach() 557 const struct linux_binprm *bprm, in x_to_label() argument 585 new = find_attach(bprm, ns, &profile->base.profiles, in x_to_label() 589 new = find_attach(bprm, ns, &ns->base.profiles, in x_to_label() 624 const struct linux_binprm *bprm, in profile_transition() argument [all …]
|
D | lsm.c | 721 static void apparmor_bprm_committing_creds(struct linux_binprm *bprm) in apparmor_bprm_committing_creds() argument 724 struct aa_label *new_label = cred_label(bprm->cred); in apparmor_bprm_committing_creds() 731 aa_inherit_files(bprm->cred, current->files); in apparmor_bprm_committing_creds() 743 static void apparmor_bprm_committed_creds(struct linux_binprm *bprm) in apparmor_bprm_committed_creds() argument
|
/security/tomoyo/ |
D | audit.c | 22 static char *tomoyo_print_bprm(struct linux_binprm *bprm, in tomoyo_print_bprm() argument 30 unsigned long pos = bprm->p; in tomoyo_print_bprm() 32 int argv_count = bprm->argc; in tomoyo_print_bprm() 33 int envp_count = bprm->envc; in tomoyo_print_bprm() 46 if (!tomoyo_dump_page(bprm, pos, dump)) in tomoyo_print_bprm() 261 struct file *file = r->ee->bprm->file; in tomoyo_init_log() 264 bprm_info = tomoyo_print_bprm(r->ee->bprm, &r->ee->dump); in tomoyo_init_log() 281 struct linux_binprm *bprm = r->ee->bprm; in tomoyo_init_log() local 285 realpath, bprm->argc, bprm->envc, bprm_info); in tomoyo_init_log()
|
D | domain.c | 616 struct linux_binprm *bprm = ee->bprm; in tomoyo_environ() local 621 unsigned long pos = bprm->p; in tomoyo_environ() 623 int argv_count = bprm->argc; in tomoyo_environ() 624 int envp_count = bprm->envc; in tomoyo_environ() 637 if (!tomoyo_dump_page(bprm, pos, &env_page)) in tomoyo_environ() 701 int tomoyo_find_next_domain(struct linux_binprm *bprm) in tomoyo_find_next_domain() argument 705 const char *original_name = bprm->filename; in tomoyo_find_next_domain() 722 ee->bprm = bprm; in tomoyo_find_next_domain() 724 ee->obj.path1 = bprm->file->f_path; in tomoyo_find_next_domain() 896 bool tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos, in tomoyo_dump_page() argument [all …]
|
D | condition.c | 109 struct linux_binprm *bprm = ee->bprm; in tomoyo_scan_bprm() local 113 unsigned long pos = bprm->p; in tomoyo_scan_bprm() 115 int argv_count = bprm->argc; in tomoyo_scan_bprm() 116 int envp_count = bprm->envc; in tomoyo_scan_bprm() 130 if (!tomoyo_dump_page(bprm, pos, dump)) { in tomoyo_scan_bprm() 160 if (!tomoyo_argv(bprm->argc - argv_count, in tomoyo_scan_bprm() 780 struct linux_binprm *bprm = NULL; in tomoyo_condition() local 789 bprm = r->ee->bprm; in tomoyo_condition() 790 if (!bprm && (argc || envc)) in tomoyo_condition() 826 file = ee ? ee->bprm->file : NULL; in tomoyo_condition() [all …]
|
D | tomoyo.c | 55 static void tomoyo_bprm_committed_creds(struct linux_binprm *bprm) in tomoyo_bprm_committed_creds() argument 72 static int tomoyo_bprm_creds_for_exec(struct linux_binprm *bprm) in tomoyo_bprm_creds_for_exec() argument 79 tomoyo_load_policy(bprm->filename); in tomoyo_bprm_creds_for_exec() 91 static int tomoyo_bprm_check_security(struct linux_binprm *bprm) in tomoyo_bprm_check_security() argument 101 const int err = tomoyo_find_next_domain(bprm); in tomoyo_bprm_check_security() 110 &bprm->file->f_path, O_RDONLY); in tomoyo_bprm_check_security()
|
D | common.h | 624 struct linux_binprm *bprm; member 938 bool tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos, 975 int tomoyo_find_next_domain(struct linux_binprm *bprm);
|
/security/ |
D | commoncap.c | 595 struct linux_binprm *bprm, in bprm_caps_from_vfs_caps() argument 599 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps() 731 static int get_file_caps(struct linux_binprm *bprm, struct file *file, in get_file_caps() argument 737 cap_clear(bprm->cred->cap_permitted); in get_file_caps() 758 bprm->filename); in get_file_caps() 764 rc = bprm_caps_from_vfs_caps(&vcaps, bprm, effective, has_fcap); in get_file_caps() 768 cap_clear(bprm->cred->cap_permitted); in get_file_caps() 796 static void handle_privileged_root(struct linux_binprm *bprm, bool has_fcap, in handle_privileged_root() argument 800 struct cred *new = bprm->cred; in handle_privileged_root() 810 warn_setuid_and_fcaps_mixed(bprm->filename); in handle_privileged_root() [all …]
|
D | security.c | 855 int security_bprm_creds_for_exec(struct linux_binprm *bprm) in security_bprm_creds_for_exec() argument 857 return call_int_hook(bprm_creds_for_exec, 0, bprm); in security_bprm_creds_for_exec() 860 int security_bprm_creds_from_file(struct linux_binprm *bprm, struct file *file) in security_bprm_creds_from_file() argument 862 return call_int_hook(bprm_creds_from_file, 0, bprm, file); in security_bprm_creds_from_file() 865 int security_bprm_check(struct linux_binprm *bprm) in security_bprm_check() argument 869 ret = call_int_hook(bprm_check_security, 0, bprm); in security_bprm_check() 872 return ima_bprm_check(bprm); in security_bprm_check() 875 void security_bprm_committing_creds(struct linux_binprm *bprm) in security_bprm_committing_creds() argument 877 call_void_hook(bprm_committing_creds, bprm); in security_bprm_committing_creds() 880 void security_bprm_committed_creds(struct linux_binprm *bprm) in security_bprm_committed_creds() argument [all …]
|
/security/apparmor/include/ |
D | domain.h | 33 int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm);
|
/security/integrity/ima/ |
D | ima_main.c | 503 int ima_bprm_check(struct linux_binprm *bprm) in ima_bprm_check() argument 509 ret = process_measurement(bprm->file, current_cred(), secid, NULL, 0, in ima_bprm_check() 514 security_cred_getsecid(bprm->cred, &secid); in ima_bprm_check() 515 return process_measurement(bprm->file, bprm->cred, secid, NULL, 0, in ima_bprm_check()
|
D | ima.h | 193 hook(BPRM_CHECK, bprm) \
|
/security/selinux/ |
D | hooks.c | 2225 static int check_nnp_nosuid(const struct linux_binprm *bprm, in check_nnp_nosuid() argument 2229 int nnp = (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS); in check_nnp_nosuid() 2230 int nosuid = !mnt_may_suid(bprm->file->f_path.mnt); in check_nnp_nosuid() 2279 static int selinux_bprm_creds_for_exec(struct linux_binprm *bprm) in selinux_bprm_creds_for_exec() argument 2285 struct inode *inode = file_inode(bprm->file); in selinux_bprm_creds_for_exec() 2292 new_tsec = selinux_cred(bprm->cred); in selinux_bprm_creds_for_exec() 2310 rc = check_nnp_nosuid(bprm, old_tsec, new_tsec); in selinux_bprm_creds_for_exec() 2325 rc = check_nnp_nosuid(bprm, old_tsec, new_tsec); in selinux_bprm_creds_for_exec() 2331 ad.u.file = bprm->file; in selinux_bprm_creds_for_exec() 2354 if (bprm->unsafe & LSM_UNSAFE_SHARE) { in selinux_bprm_creds_for_exec() [all …]
|
/security/smack/ |
D | smack_lsm.c | 923 static int smack_bprm_creds_for_exec(struct linux_binprm *bprm) in smack_bprm_creds_for_exec() argument 925 struct inode *inode = file_inode(bprm->file); in smack_bprm_creds_for_exec() 926 struct task_smack *bsp = smack_cred(bprm->cred); in smack_bprm_creds_for_exec() 940 if (bprm->unsafe & LSM_UNSAFE_PTRACE) { in smack_bprm_creds_for_exec() 956 if (bprm->unsafe & ~LSM_UNSAFE_PTRACE) in smack_bprm_creds_for_exec() 960 bprm->per_clear |= PER_CLEAR_ON_SETID; in smack_bprm_creds_for_exec() 964 bprm->secureexec = 1; in smack_bprm_creds_for_exec()
|