| /security/apparmor/include/ |
| A D | mount.h | 28 int aa_remount(const struct cred *subj_cred, 32 int aa_bind_mount(const struct cred *subj_cred, 37 int aa_mount_change_type(const struct cred *subj_cred, 41 int aa_move_mount_old(const struct cred *subj_cred, 44 int aa_move_mount(const struct cred *subj_cred, 48 int aa_new_mount(const struct cred *subj_cred, 53 int aa_umount(const struct cred *subj_cred, 56 int aa_pivotroot(const struct cred *subj_cred,
|
| A D | file.h | 87 int __aa_path_perm(const char *op, const struct cred *subj_cred, 91 int aa_path_perm(const char *op, const struct cred *subj_cred, 95 int aa_path_link(const struct cred *subj_cred, struct aa_label *label, 99 int aa_file_perm(const char *op, const struct cred *subj_cred,
|
| A D | net.h | 69 NAME.subj_cred = (CRED); \ 99 int aa_af_perm(const struct cred *subj_cred, struct aa_label *label, 112 int aa_sock_file_perm(const struct cred *subj_cred, struct aa_label *label,
|
| A D | af_unix.h | 35 int aa_unix_peer_perm(const struct cred *subj_cred, 52 int aa_unix_file_perm(const struct cred *subj_cred, struct aa_label *label,
|
| A D | policy.h | 416 bool aa_policy_view_capable(const struct cred *subj_cred, 418 bool aa_policy_admin_capable(const struct cred *subj_cred, 420 int aa_may_manage_policy(const struct cred *subj_cred,
|
| A D | ipc.h | 19 int aa_may_signal(const struct cred *subj_cred, struct aa_label *sender,
|
| A D | resource.h | 36 int aa_task_setrlimit(const struct cred *subj_cred, struct aa_label *label,
|
| A D | capability.h | 40 int aa_capable(const struct cred *subj_cred, struct aa_label *label,
|
| A D | audit.h | 116 const struct cred *subj_cred; member
|
| /security/apparmor/ |
| A D | file.c | 49 kuid_t fsuid = ad->subj_cred ? ad->subj_cred->fsuid : current_fsuid(); in file_audit_cb() 95 int aa_audit_file(const struct cred *subj_cred, in aa_audit_file() argument 104 ad.subj_cred = subj_cred; in aa_audit_file() 161 aa_audit_file(subj_cred, in path_name() 236 return aa_audit_file(subj_cred, in __aa_path_perm() 401 return aa_audit_file(subj_cred, in profile_path_link() 425 int aa_path_link(const struct cred *subj_cred, in aa_path_link() argument 506 profile_path_perm(op, subj_cred, profile, in __file_path_perm() 520 profile_path_perm(op, subj_cred, in __file_path_perm() 526 profile_path_perm(op, subj_cred, in __file_path_perm() [all …]
|
| A D | mount.c | 134 static int audit_mount(const struct cred *subj_cred, in audit_mount() argument 173 ad.subj_cred = subj_cred; in audit_mount() 366 static int match_mnt(const struct cred *subj_cred, in match_mnt() argument 394 int aa_remount(const struct cred *subj_cred, in aa_remount() argument 412 match_mnt(subj_cred, profile, path, buffer, NULL, in aa_remount() 420 int aa_bind_mount(const struct cred *subj_cred, in aa_bind_mount() argument 485 int aa_move_mount(const struct cred *subj_cred, in aa_move_mount() argument 582 match_mnt(subj_cred, profile, path, buffer, in aa_new_mount() 587 match_mnt_path_str(subj_cred, profile, path, in aa_new_mount() 735 build_pivotroot(subj_cred, profile, new_path, in aa_pivotroot() [all …]
|
| A D | resource.c | 56 static int audit_resource(const struct cred *subj_cred, in audit_resource() argument 64 ad.subj_cred = subj_cred; in audit_resource() 88 static int profile_setrlimit(const struct cred *subj_cred, in profile_setrlimit() argument 98 return audit_resource(subj_cred, profile, resource, new_rlim->rlim_max, in profile_setrlimit() 114 int aa_task_setrlimit(const struct cred *subj_cred, struct aa_label *label, in aa_task_setrlimit() argument 134 aa_capable(subj_cred, label, CAP_SYS_RESOURCE, CAP_OPT_NOAUDIT) != 0) in aa_task_setrlimit() 136 audit_resource(subj_cred, profile, resource, in aa_task_setrlimit() 141 profile_setrlimit(subj_cred, profile, resource, in aa_task_setrlimit()
|
| A D | domain.c | 894 profile_transition(subj_cred, profile, bprm, in handle_onexec() 921 const struct cred *subj_cred; in apparmor_bprm_creds_for_exec() local 934 subj_cred = current_cred(); in apparmor_bprm_creds_for_exec() 1223 const struct cred *subj_cred; in aa_change_hat() local 1232 subj_cred = get_current_cred(); in aa_change_hat() 1233 label = aa_get_newest_cred_label(subj_cred); in aa_change_hat() 1332 put_cred(subj_cred); in aa_change_hat() 1351 const struct cred *subj_cred, in change_profile_perms_wrapper() argument 1497 subj_cred, in aa_change_profile() 1569 aa_audit_file(subj_cred, in aa_change_profile() [all …]
|
| A D | af_unix.c | 55 return aa_path_perm(op, subj_cred, label, path, in unix_fs_perm() 240 return unix_fs_perm(ad->op, request, ad->subj_cred, in profile_sk_perm() 303 ad->subj_cred, &profile->label, in profile_listen_perm() 338 ad->subj_cred, &profile->label, in profile_accept_perm() 369 ad->subj_cred, &profile->label, in profile_opt_perm() 410 return unix_fs_perm(ad->op, request, ad->subj_cred, in profile_peer_perm() 452 DEFINE_AUDIT_SK(ad, op, subj_cred, sk); in aa_unix_label_sk_perm() 607 DEFINE_AUDIT_SK(ad, op, subj_cred, sk); in unix_peer_perm() 623 int aa_unix_peer_perm(const struct cred *subj_cred, in aa_unix_peer_perm() argument 758 unix_fs_perm(op, request, subj_cred, label, in aa_unix_file_perm() [all …]
|
| A D | capability.c | 97 if (ad->subj_cred == ent->ad_subj_cred && ktime_get_ns() <= ent->ktime_ns_expiration[cap]) { in audit_caps() 104 ent->ad_subj_cred = get_cred(ad->subj_cred); in audit_caps() 179 int aa_capable(const struct cred *subj_cred, struct aa_label *label, in aa_capable() argument 186 ad.subj_cred = subj_cred; in aa_capable()
|
| A D | net.c | 272 int aa_af_perm(const struct cred *subj_cred, struct aa_label *label, in aa_af_perm() argument 276 DEFINE_AUDIT_NET(ad, op, subj_cred, NULL, family, type, protocol); in aa_af_perm() 283 static int aa_label_sk_perm(const struct cred *subj_cred, in aa_label_sk_perm() argument 296 DEFINE_AUDIT_SK(ad, op, subj_cred, sk); in aa_label_sk_perm() 298 ad.subj_cred = subj_cred; in aa_label_sk_perm() 323 int aa_sock_file_perm(const struct cred *subj_cred, struct aa_label *label, in aa_sock_file_perm() argument 333 return aa_unix_file_perm(subj_cred, label, op, request, file); in aa_sock_file_perm() 334 return aa_label_sk_perm(subj_cred, label, op, request, sock->sk); in aa_sock_file_perm()
|
| A D | ipc.c | 90 ad->subj_cred = cred; in profile_signal_perm() 102 int aa_may_signal(const struct cred *subj_cred, struct aa_label *sender, in aa_may_signal() argument 112 profile_signal_perm(subj_cred, profile, target, in aa_may_signal()
|
| A D | policy.c | 821 static int policy_ns_capable(const struct cred *subj_cred, in policy_ns_capable() argument 828 err = cap_capable(subj_cred, userns, cap, CAP_OPT_NONE); in policy_ns_capable() 830 err = aa_capable(subj_cred, label, cap, CAP_OPT_NONE); in policy_ns_capable() 846 bool aa_policy_view_capable(const struct cred *subj_cred, in aa_policy_view_capable() argument 849 struct user_namespace *user_ns = subj_cred->user_ns; in aa_policy_view_capable() 866 bool aa_policy_admin_capable(const struct cred *subj_cred, in aa_policy_admin_capable() argument 869 struct user_namespace *user_ns = subj_cred->user_ns; in aa_policy_admin_capable() 870 bool capable = policy_ns_capable(subj_cred, label, user_ns, in aa_policy_admin_capable() 876 return aa_policy_view_capable(subj_cred, label, ns) && capable && in aa_policy_admin_capable() 913 int aa_may_manage_policy(const struct cred *subj_cred, struct aa_label *label, in aa_may_manage_policy() argument [all …]
|
| A D | task.c | 234 ad->subj_cred = cred; in profile_ptrace_perm()
|
| A D | lsm.c | 1063 ad.subj_cred = current_cred(); in apparmor_userns_create()
|