diff options
author | Casey Schaufler <casey@schaufler-ca.com> | 2024-07-11 00:32:28 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2024-07-29 23:54:51 +0300 |
commit | a39c0f77dbbe083f3eec6c3b32d90f168f7575eb (patch) | |
tree | 8fbd5b886731815d9ca08101f1b48badb7d011d0 /security/selinux/include | |
parent | 09001284eebfc1b684e81d1db0f006787d35f3e1 (diff) | |
download | linux-a39c0f77dbbe083f3eec6c3b32d90f168f7575eb.tar.xz |
lsm: infrastructure management of the dev_tun blob
Move management of the dev_tun security blob out of the individual
security modules and into the LSM infrastructure. The security modules
tell the infrastructure how much space they require at initialization.
There are no longer any modules that require the dev_tun_free hook.
The hook definition has been removed.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: John Johansen <john.johansen@canonical.com>
[PM: subject tweak, selinux style fixes]
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 83b9443d6919..b7d4b1fc8fee 100644 --- a/security/selinux/include/objsec.h +++ b/security/selinux/include/objsec.h @@ -207,4 +207,9 @@ static inline struct sk_security_struct *selinux_sock(const struct sock *sock) return sock->sk_security + selinux_blob_sizes.lbs_sock; } +static inline struct tun_security_struct *selinux_tun_dev(void *security) +{ + return security + selinux_blob_sizes.lbs_tun_dev; +} + #endif /* _SELINUX_OBJSEC_H_ */ |