| /security/apparmor/ |
| A D | domain.c | 326 d = bprm->file->f_path.dentry; in aa_xattrs_match() 675 AA_BUG(!bprm); in profile_transition() 687 name = bprm->filename; in profile_transition() 806 AA_BUG(!bprm); in profile_onexec() 827 xname = bprm->filename; in profile_onexec() 880 AA_BUG(!bprm); in handle_onexec() 928 file_inode(bprm->file)); in apparmor_bprm_creds_for_exec() 931 file_inode(bprm->file)->i_mode in apparmor_bprm_creds_for_exec() 1009 bprm->filename); in apparmor_bprm_creds_for_exec() 1013 bprm->secureexec = 1; in apparmor_bprm_creds_for_exec() [all …]
|
| A D | lsm.c | 961 static void apparmor_bprm_committing_creds(const struct linux_binprm *bprm) in apparmor_bprm_committing_creds() argument 964 struct aa_label *new_label = cred_label(bprm->cred); in apparmor_bprm_committing_creds() 971 aa_inherit_files(bprm->cred, current->files); in apparmor_bprm_committing_creds() 983 static void apparmor_bprm_committed_creds(const struct linux_binprm *bprm) in apparmor_bprm_committed_creds() argument
|
| /security/tomoyo/ |
| A 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()
|
| A 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() 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() 926 mmap_read_lock(bprm->mm); in tomoyo_dump_page() 929 mmap_read_unlock(bprm->mm); in tomoyo_dump_page() [all …]
|
| A 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() 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() 928 if (!bprm) in tomoyo_condition() 930 value = bprm->argc; in tomoyo_condition() 933 if (!bprm) in tomoyo_condition() [all …]
|
| A D | tomoyo.c | 56 static void tomoyo_bprm_committed_creds(const struct linux_binprm *bprm) in tomoyo_bprm_committed_creds() argument 73 static int tomoyo_bprm_creds_for_exec(struct linux_binprm *bprm) in tomoyo_bprm_creds_for_exec() argument 80 tomoyo_load_policy(bprm->filename); in tomoyo_bprm_creds_for_exec() 92 static int tomoyo_bprm_check_security(struct linux_binprm *bprm) in tomoyo_bprm_check_security() argument 102 const int err = tomoyo_find_next_domain(bprm); in tomoyo_bprm_check_security() 111 &bprm->file->f_path, O_RDONLY); in tomoyo_bprm_check_security()
|
| A 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/ |
| A D | commoncap.c | 617 struct linux_binprm *bprm, in bprm_caps_from_vfs_caps() argument 621 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps() 759 cap_clear(bprm->cred->cap_permitted); in get_file_caps() 780 bprm->filename); in get_file_caps() 790 cap_clear(bprm->cred->cap_permitted); in get_file_caps() 822 struct cred *new = bprm->cred; in handle_privileged_root() 913 struct cred *new = bprm->cred; in cap_bprm_creds_from_file() 931 bprm->per_clear |= PER_CLEAR_ON_SETID; in cap_bprm_creds_from_file() 941 ((bprm->unsafe & ~LSM_UNSAFE_PTRACE) || in cap_bprm_creds_from_file() 979 ret = audit_log_bprm_fcaps(bprm, new, old); in cap_bprm_creds_from_file() [all …]
|
| A D | security.c | 1259 int security_bprm_creds_for_exec(struct linux_binprm *bprm) in security_bprm_creds_for_exec() argument 1261 return call_int_hook(bprm_creds_for_exec, bprm); in security_bprm_creds_for_exec() 1283 int security_bprm_creds_from_file(struct linux_binprm *bprm, const struct file *file) in security_bprm_creds_from_file() argument 1285 return call_int_hook(bprm_creds_from_file, bprm, file); in security_bprm_creds_from_file() 1300 int security_bprm_check(struct linux_binprm *bprm) in security_bprm_check() argument 1302 return call_int_hook(bprm_check_security, bprm); in security_bprm_check() 1317 void security_bprm_committing_creds(const struct linux_binprm *bprm) in security_bprm_committing_creds() argument 1319 call_void_hook(bprm_committing_creds, bprm); in security_bprm_committing_creds() 1333 void security_bprm_committed_creds(const struct linux_binprm *bprm) in security_bprm_committed_creds() argument 1335 call_void_hook(bprm_committed_creds, bprm); in security_bprm_committed_creds()
|
| /security/landlock/ |
| A D | cred.c | 48 static int hook_bprm_creds_for_exec(struct linux_binprm *const bprm) in hook_bprm_creds_for_exec() argument 51 landlock_cred(bprm->cred)->domain_exec = 0; in hook_bprm_creds_for_exec()
|
| /security/integrity/ima/ |
| A D | ima_main.c | 574 static int ima_bprm_check(struct linux_binprm *bprm) in ima_bprm_check() argument 580 ret = process_measurement(bprm->file, current_cred(), in ima_bprm_check() 585 security_cred_getlsmprop(bprm->cred, &prop); in ima_bprm_check() 586 return process_measurement(bprm->file, bprm->cred, &prop, NULL, 0, in ima_bprm_check() 603 static int ima_bprm_creds_for_exec(struct linux_binprm *bprm) in ima_bprm_creds_for_exec() argument 612 if (!bprm->is_check) in ima_bprm_creds_for_exec() 615 return ima_bprm_check(bprm); in ima_bprm_creds_for_exec()
|
| A D | ima_appraise.c | 475 struct linux_binprm *bprm; in is_bprm_creds_for_exec() local 478 bprm = container_of(&file, struct linux_binprm, file); in is_bprm_creds_for_exec() 479 return bprm->is_check; in is_bprm_creds_for_exec()
|
| A D | ima.h | 318 hook(BPRM_CHECK, bprm) \
|
| /security/apparmor/include/ |
| A D | domain.h | 28 int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm);
|
| /security/ipe/ |
| A D | hooks.c | 30 int ipe_bprm_check_security(struct linux_binprm *bprm) in ipe_bprm_check_security() argument 34 ipe_build_eval_ctx(&ctx, bprm->file, IPE_OP_EXEC, IPE_HOOK_BPRM_CHECK); in ipe_bprm_check_security()
|
| A D | hooks.h | 25 int ipe_bprm_check_security(struct linux_binprm *bprm);
|
| /security/selinux/ |
| A D | hooks.c | 2253 int nnp = (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS); in check_nnp_nosuid() 2308 struct inode *inode = file_inode(bprm->file); in selinux_bprm_creds_for_exec() 2315 new_tsec = selinux_cred(bprm->cred); in selinux_bprm_creds_for_exec() 2346 rc = check_nnp_nosuid(bprm, old_tsec, new_tsec); in selinux_bprm_creds_for_exec() 2361 rc = check_nnp_nosuid(bprm, old_tsec, new_tsec); in selinux_bprm_creds_for_exec() 2367 ad.u.file = bprm->file; in selinux_bprm_creds_for_exec() 2387 if (bprm->unsafe & LSM_UNSAFE_SHARE) { in selinux_bprm_creds_for_exec() 2397 if (bprm->unsafe & LSM_UNSAFE_PTRACE) { in selinux_bprm_creds_for_exec() 2409 bprm->per_clear |= PER_CLEAR_ON_SETID; in selinux_bprm_creds_for_exec() 2417 bprm->secureexec |= !!rc; in selinux_bprm_creds_for_exec() [all …]
|
| /security/smack/ |
| A D | smack_lsm.c | 901 static int smack_bprm_creds_for_exec(struct linux_binprm *bprm) in smack_bprm_creds_for_exec() argument 903 struct inode *inode = file_inode(bprm->file); in smack_bprm_creds_for_exec() 904 struct task_smack *bsp = smack_cred(bprm->cred); in smack_bprm_creds_for_exec() 918 if (bprm->unsafe & LSM_UNSAFE_PTRACE) { in smack_bprm_creds_for_exec() 934 if (bprm->unsafe & ~LSM_UNSAFE_PTRACE) in smack_bprm_creds_for_exec() 938 bprm->per_clear |= PER_CLEAR_ON_SETID; in smack_bprm_creds_for_exec() 942 bprm->secureexec = 1; in smack_bprm_creds_for_exec()
|