diff options
author | John Johansen <john.johansen@canonical.com> | 2023-03-06 18:27:55 +0300 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2023-10-19 01:29:55 +0300 |
commit | 79ddd4a7c5fa8883f99a88409e5ad9812e484094 (patch) | |
tree | b0255002ceacba052e7ed2fe58e8d667cf604fb0 /security/apparmor/include | |
parent | 2516fde1fa00cf92e0932182c4b315df3de41806 (diff) | |
download | linux-79ddd4a7c5fa8883f99a88409e5ad9812e484094.tar.xz |
apparmor: rename SK_CTX() to aa_sock and make it an inline fn
In preparation for LSM stacking rework the macro to an inline fn
Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include')
-rw-r--r-- | security/apparmor/include/net.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/security/apparmor/include/net.h b/security/apparmor/include/net.h index 64a0112bf62d..e29f011be3d7 100644 --- a/security/apparmor/include/net.h +++ b/security/apparmor/include/net.h @@ -52,6 +52,11 @@ struct aa_sk_ctx { }; #define SK_CTX(X) ((X)->sk_security) +static inline struct aa_sk_ctx *aa_sock(const struct sock *sk) +{ + return sk->sk_security; +} + #define DEFINE_AUDIT_NET(NAME, OP, SK, F, T, P) \ struct lsm_network_audit NAME ## _net = { .sk = (SK), \ .family = (F)}; \ |