Home
last modified time | relevance | path

Searched refs:subj_cred (Results 1 – 22 of 22) sorted by relevance

/linux/security/apparmor/include/
H A Dmount.h28 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,
H A Dfile.h87 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,
H A Dnet.h69 NAME.subj_cred = (CRED); \
99 int aa_af_perm(const struct cred *subj_cred, struct aa_label *label,
111 int aa_label_sk_perm(const struct cred *subj_cred, struct aa_label *label,
113 int aa_sock_file_perm(const struct cred *subj_cred, struct aa_label *label,
H A Daf_unix.h35 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,
H A Dpolicy.h447 bool aa_policy_view_capable(const struct cred *subj_cred,
449 bool aa_policy_admin_capable(const struct cred *subj_cred,
451 int aa_may_manage_policy(const struct cred *subj_cred,
H A Dipc.h19 int aa_may_signal(const struct cred *subj_cred, struct aa_label *sender,
H A Dresource.h36 int aa_task_setrlimit(const struct cred *subj_cred, struct aa_label *label,
H A Dcapability.h41 int aa_capable(const struct cred *subj_cred, struct aa_label *label,
H A Daf_inet.h32 int aa_inet_file_perm(const struct cred *subj_cred,
H A Daudit.h117 const struct cred *subj_cred; member
/linux/security/apparmor/
H A Dfile.c49 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
106 ad.subj_cred = subj_cred; in aa_audit_file()
156 static int path_name(const char *op, const struct cred *subj_cred, in path_name() argument
173 aa_audit_file(subj_cred, in path_name()
233 int __aa_path_perm(const char *op, const struct cred *subj_cred, in __aa_path_perm() argument
248 return aa_audit_file(subj_cred, in __aa_path_perm()
254 static int profile_path_perm(const char *op, const struct cred *subj_cred, in profile_path_perm() argument
266 error = path_name(op, subj_cred, &profile->label, path, in profile_path_perm()
271 return __aa_path_perm(op, subj_cred, profile, name, request, cond, in profile_path_perm()
[all …]
H A Dresource.c56 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()
H A Ddomain.c665 static struct aa_label *profile_transition(const struct cred *subj_cred, in profile_transition() argument
712 (void) aa_audit_file(subj_cred, profile, &perms, in profile_transition()
787 aa_audit_file(subj_cred, profile, &perms, OP_EXEC, MAY_EXEC, name, in profile_transition()
798 static int profile_onexec(const struct cred *subj_cred, in profile_onexec() argument
866 return aa_audit_file(subj_cred, profile, &perms, OP_EXEC, in profile_onexec()
882 static bool is_profile_priv_restricted_to_stack(const struct cred *subj_cred, in is_profile_priv_restricted_to_stack() argument
898 static struct aa_label *priv_restricted_transition(const struct cred *subj_cred, in priv_restricted_transition() argument
905 if (!is_profile_priv_restricted_to_stack(subj_cred, profile)) in priv_restricted_transition()
921 aa_audit_file(subj_cred, profile, &perms, op, in priv_restricted_transition()
923 subj_cred->euid, stack_msg, 0); in priv_restricted_transition()
[all …]
H A Dmount.c29 NAME.subj_cred = (CRED)
328 int aa_remount(const struct cred *subj_cred, in aa_remount() argument
336 DEFINE_AUDIT_MOUNT(ad, OP_MOUNT, subj_cred); in aa_remount()
355 int aa_bind_mount(const struct cred *subj_cred, in aa_bind_mount() argument
363 DEFINE_AUDIT_MOUNT(ad, OP_MOUNT, subj_cred); in aa_bind_mount()
396 int aa_mount_change_type(const struct cred *subj_cred, in aa_mount_change_type() argument
403 DEFINE_AUDIT_MOUNT(ad, OP_MOUNT, subj_cred); in aa_mount_change_type()
424 int aa_move_mount(const struct cred *subj_cred, in aa_move_mount() argument
431 DEFINE_AUDIT_MOUNT(ad, OP_MOUNT, subj_cred); in aa_move_mount()
458 int aa_move_mount_old(const struct cred *subj_cred, struct aa_label *label, in aa_move_mount_old() argument
[all …]
H A Dnet.c276 int aa_af_perm(const struct cred *subj_cred, struct aa_label *label, in aa_af_perm() argument
280 DEFINE_AUDIT_NET(ad, op, subj_cred, NULL, family, type, protocol); in aa_af_perm()
287 int aa_label_sk_perm(const struct cred *subj_cred, struct aa_label *label, in aa_label_sk_perm() argument
298 DEFINE_AUDIT_SK(ad, op, subj_cred, sk); in aa_label_sk_perm()
300 ad.subj_cred = subj_cred; in aa_label_sk_perm()
327 int aa_sock_file_perm(const struct cred *subj_cred, struct aa_label *label, in aa_sock_file_perm() argument
340 return aa_unix_file_perm(subj_cred, label, op, request, file); in aa_sock_file_perm()
343 return aa_inet_file_perm(subj_cred, label, op, request, sock); in aa_sock_file_perm()
345 return aa_label_sk_perm(subj_cred, label, op, request, sock->sk); in aa_sock_file_perm()
H A Daf_unix.c34 static int unix_fs_perm(const char *op, u32 mask, const struct cred *subj_cred, in unix_fs_perm() argument
56 return aa_path_perm(op, subj_cred, label, path, in unix_fs_perm()
241 return unix_fs_perm(ad->op, request, ad->subj_cred, in profile_sk_perm()
304 ad->subj_cred, &profile->label, in profile_listen_perm()
339 ad->subj_cred, &profile->label, in profile_accept_perm()
370 ad->subj_cred, &profile->label, in profile_opt_perm()
411 return unix_fs_perm(ad->op, request, ad->subj_cred, in profile_peer_perm()
414 return unix_fs_perm(ad->op, request, ad->subj_cred, in profile_peer_perm()
446 static int aa_unix_label_sk_perm(const struct cred *subj_cred, in aa_unix_label_sk_perm() argument
453 DEFINE_AUDIT_SK(ad, op, subj_cred, sk); in aa_unix_label_sk_perm()
[all …]
H A Dcapability.c97 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()
H A Dipc.c90 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()
H A Dpolicy.c882 static int policy_ns_capable(const struct cred *subj_cred, in policy_ns_capable() argument
889 err = cap_capable(subj_cred, userns, cap, CAP_OPT_NONE); in policy_ns_capable()
891 err = aa_capable(subj_cred, label, cap, CAP_OPT_NONE); in policy_ns_capable()
907 bool aa_policy_view_capable(const struct cred *subj_cred, in aa_policy_view_capable() argument
910 struct user_namespace *user_ns = subj_cred->user_ns; in aa_policy_view_capable()
927 bool aa_policy_admin_capable(const struct cred *subj_cred, in aa_policy_admin_capable() argument
930 struct user_namespace *user_ns = subj_cred->user_ns; in aa_policy_admin_capable()
931 bool capable = policy_ns_capable(subj_cred, label, user_ns, in aa_policy_admin_capable()
937 return aa_policy_view_capable(subj_cred, label, ns) && capable && in aa_policy_admin_capable()
1001 int aa_may_manage_policy(const struct cred *subj_cred, struct aa_label *label, in aa_may_manage_policy() argument
[all …]
H A Daf_inet.c336 (AAD).subj_cred = (CRED); \
398 ad.subj_cred = current_cred(); in aa_inet_create_perm()
526 int aa_inet_file_perm(const struct cred *subj_cred, struct aa_label *label, in aa_inet_file_perm() argument
541 error = label_sk_has_perm1(subj_cred, label, sock->sk, op, request, in aa_inet_file_perm()
553 error = label_sk_has_perm1(subj_cred, label, sock->sk, in aa_inet_file_perm()
H A Dtask.c262 ad->subj_cred = cred; in profile_ptrace_perm()
H A Dlsm.c1059 ad.subj_cred = current_cred(); in apparmor_userns_create()