aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/include/net.h
diff options
context:
space:
mode:
authorJohn Johansen <[email protected]>2022-09-20 03:48:48 +0000
committerJohn Johansen <[email protected]>2023-10-18 22:30:38 +0000
commit90c436a64a6e20482a9a613c47eb4af2e8a5328e (patch)
treeb5df0d74b93bb320f34f5b4a109f46a9128ea0b7 /security/apparmor/include/net.h
parentapparmor: rename audit_data->label to audit_data->subj_label (diff)
downloadkernel-90c436a64a6e20482a9a613c47eb4af2e8a5328e.tar.gz
kernel-90c436a64a6e20482a9a613c47eb4af2e8a5328e.zip
apparmor: pass cred through to audit info.
The cred is needed to properly audit some messages, and will be needed in the future for uid conditional mediation. So pass it through to where the apparmor_audit_data struct gets defined. Reviewed-by: Georgia Garcia <[email protected]> Signed-off-by: John Johansen <[email protected]>
Diffstat (limited to 'security/apparmor/include/net.h')
-rw-r--r--security/apparmor/include/net.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/security/apparmor/include/net.h b/security/apparmor/include/net.h
index e0068a3a4efd..67bf888c3bd6 100644
--- a/security/apparmor/include/net.h
+++ b/security/apparmor/include/net.h
@@ -97,7 +97,8 @@ void audit_net_cb(struct audit_buffer *ab, void *va);
int aa_profile_af_perm(struct aa_profile *profile,
struct apparmor_audit_data *ad,
u32 request, u16 family, int type);
-int aa_af_perm(struct aa_label *label, const char *op, u32 request, u16 family,
+int aa_af_perm(const struct cred *subj_cred, struct aa_label *label,
+ const char *op, u32 request, u16 family,
int type, int protocol);
static inline int aa_profile_af_sk_perm(struct aa_profile *profile,
struct apparmor_audit_data *ad,
@@ -109,7 +110,8 @@ static inline int aa_profile_af_sk_perm(struct aa_profile *profile,
}
int aa_sk_perm(const char *op, u32 request, struct sock *sk);
-int aa_sock_file_perm(struct aa_label *label, const char *op, u32 request,
+int aa_sock_file_perm(const struct cred *subj_cred, struct aa_label *label,
+ const char *op, u32 request,
struct socket *sock);
int apparmor_secmark_check(struct aa_label *label, char *op, u32 request,