diff options
author | Casey Schaufler <casey@schaufler-ca.com> | 2024-07-11 00:32:25 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2024-07-29 23:54:50 +0300 |
commit | 2aff9d20d50ac45dd13a013ef5231f4fb8912356 (patch) | |
tree | c9fd24e54e311830f16c354d86a1c574ac196bb2 /security/selinux/include | |
parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) | |
download | linux-2aff9d20d50ac45dd13a013ef5231f4fb8912356.tar.xz |
lsm: infrastructure management of the sock security
Move management of the sock->sk_security blob out
of the individual security modules and into the security
infrastructure. Instead of allocating the blobs from within
the modules the modules tell the infrastructure how much
space is required, and the space is allocated there.
Acked-by: Paul Moore <paul@paul-moore.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: John Johansen <john.johansen@canonical.com>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[PM: subject tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/include')
-rw-r--r-- | security/selinux/include/objsec.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h index dea1d6f3ed2d..b074099acbaf 100644 --- a/security/selinux/include/objsec.h +++ b/security/selinux/include/objsec.h @@ -195,4 +195,9 @@ selinux_superblock(const struct super_block *superblock) return superblock->s_security + selinux_blob_sizes.lbs_superblock; } +static inline struct sk_security_struct *selinux_sock(const struct sock *sock) +{ + return sock->sk_security + selinux_blob_sizes.lbs_sock; +} + #endif /* _SELINUX_OBJSEC_H_ */ |