diff options
Diffstat (limited to 'security/smack/smack.h')
-rw-r--r-- | security/smack/smack.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/security/smack/smack.h b/security/smack/smack.h index 041688e5a77a..dbf8d7226eb5 100644 --- a/security/smack/smack.h +++ b/security/smack/smack.h @@ -355,6 +355,18 @@ static inline struct superblock_smack *smack_superblock( return superblock->s_security + smack_blob_sizes.lbs_superblock; } +static inline struct socket_smack *smack_sock(const struct sock *sock) +{ + return sock->sk_security + smack_blob_sizes.lbs_sock; +} + +#ifdef CONFIG_KEYS +static inline struct smack_known **smack_key(const struct key *key) +{ + return key->security + smack_blob_sizes.lbs_key; +} +#endif /* CONFIG_KEYS */ + /* * Is the directory transmuting? */ |