Home
last modified time | relevance | path

Searched refs:bprm (Results 1 – 14 of 14) sorted by relevance

/security/apparmor/
Ddomain.c311 static int aa_xattrs_match(const struct linux_binprm *bprm, in aa_xattrs_match() argument
320 if (!bprm || !profile->xattr_count) in aa_xattrs_match()
326 d = bprm->file->f_path.dentry; in aa_xattrs_match()
388 static struct aa_label *find_attach(const struct linux_binprm *bprm, in find_attach() argument
431 if (bprm && profile->xattr_count) { in find_attach()
437 ret = aa_xattrs_match(bprm, profile, in find_attach()
558 const struct linux_binprm *bprm, in x_to_label() argument
586 new = find_attach(bprm, ns, &profile->base.profiles, in x_to_label()
590 new = find_attach(bprm, ns, &ns->base.profiles, in x_to_label()
625 const struct linux_binprm *bprm, in profile_transition() argument
[all …]
Dlsm.c701 static void apparmor_bprm_committing_creds(struct linux_binprm *bprm) in apparmor_bprm_committing_creds() argument
704 struct aa_label *new_label = cred_label(bprm->cred); in apparmor_bprm_committing_creds()
711 aa_inherit_files(bprm->cred, current->files); in apparmor_bprm_committing_creds()
723 static void apparmor_bprm_committed_creds(struct linux_binprm *bprm) in apparmor_bprm_committed_creds() argument
/security/tomoyo/
Daudit.c22 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()
Ddomain.c616 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 …]
Dcondition.c109 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 …]
Dtomoyo.c55 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()
Dcommon.h624 struct linux_binprm *bprm; member
938 bool tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos,
976 int tomoyo_find_next_domain(struct linux_binprm *bprm);
/security/
Dcommoncap.c595 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 …]
Dsecurity.c854 int security_bprm_creds_for_exec(struct linux_binprm *bprm) in security_bprm_creds_for_exec() argument
856 return call_int_hook(bprm_creds_for_exec, 0, bprm); in security_bprm_creds_for_exec()
859 int security_bprm_creds_from_file(struct linux_binprm *bprm, struct file *file) in security_bprm_creds_from_file() argument
861 return call_int_hook(bprm_creds_from_file, 0, bprm, file); in security_bprm_creds_from_file()
864 int security_bprm_check(struct linux_binprm *bprm) in security_bprm_check() argument
868 ret = call_int_hook(bprm_check_security, 0, bprm); in security_bprm_check()
871 return ima_bprm_check(bprm); in security_bprm_check()
874 void security_bprm_committing_creds(struct linux_binprm *bprm) in security_bprm_committing_creds() argument
876 call_void_hook(bprm_committing_creds, bprm); in security_bprm_committing_creds()
879 void security_bprm_committed_creds(struct linux_binprm *bprm) in security_bprm_committed_creds() argument
[all …]
/security/apparmor/include/
Ddomain.h33 int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm);
/security/integrity/ima/
Dima_main.c502 int ima_bprm_check(struct linux_binprm *bprm) in ima_bprm_check() argument
508 ret = process_measurement(bprm->file, current_cred(), secid, NULL, 0, in ima_bprm_check()
513 security_cred_getsecid(bprm->cred, &secid); in ima_bprm_check()
514 return process_measurement(bprm->file, bprm->cred, secid, NULL, 0, in ima_bprm_check()
Dima.h193 hook(BPRM_CHECK, bprm) \
/security/selinux/
Dhooks.c2297 static int check_nnp_nosuid(const struct linux_binprm *bprm, in check_nnp_nosuid() argument
2301 int nnp = (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS); in check_nnp_nosuid()
2302 int nosuid = !mnt_may_suid(bprm->file->f_path.mnt); in check_nnp_nosuid()
2351 static int selinux_bprm_creds_for_exec(struct linux_binprm *bprm) in selinux_bprm_creds_for_exec() argument
2357 struct inode *inode = file_inode(bprm->file); in selinux_bprm_creds_for_exec()
2364 new_tsec = selinux_cred(bprm->cred); in selinux_bprm_creds_for_exec()
2382 rc = check_nnp_nosuid(bprm, old_tsec, new_tsec); in selinux_bprm_creds_for_exec()
2397 rc = check_nnp_nosuid(bprm, old_tsec, new_tsec); in selinux_bprm_creds_for_exec()
2403 ad.u.file = bprm->file; in selinux_bprm_creds_for_exec()
2426 if (bprm->unsafe & LSM_UNSAFE_SHARE) { in selinux_bprm_creds_for_exec()
[all …]
/security/smack/
Dsmack_lsm.c879 static int smack_bprm_creds_for_exec(struct linux_binprm *bprm) in smack_bprm_creds_for_exec() argument
881 struct inode *inode = file_inode(bprm->file); in smack_bprm_creds_for_exec()
882 struct task_smack *bsp = smack_cred(bprm->cred); in smack_bprm_creds_for_exec()
896 if (bprm->unsafe & LSM_UNSAFE_PTRACE) { in smack_bprm_creds_for_exec()
912 if (bprm->unsafe & ~LSM_UNSAFE_PTRACE) in smack_bprm_creds_for_exec()
916 bprm->per_clear |= PER_CLEAR_ON_SETID; in smack_bprm_creds_for_exec()
920 bprm->secureexec = 1; in smack_bprm_creds_for_exec()