diff options
Diffstat (limited to 'include/crypto/if_alg.h')
-rw-r--r-- | include/crypto/if_alg.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h index c5813c87de0..6650ae5761f 100644 --- a/include/crypto/if_alg.h +++ b/include/crypto/if_alg.h @@ -31,6 +31,9 @@ struct alg_sock { const struct af_alg_type *type; void *private; +#ifdef CONFIG_AUDIT + int id; +#endif }; struct af_alg_completion { @@ -46,6 +49,7 @@ struct af_alg_control { struct af_alg_type { void *(*bind)(const char *name, u32 type, u32 mask); void (*release)(void *private); + const char *(*alg_name)(void *private); int (*setkey)(void *private, const u8 *key, unsigned int keylen); int (*accept)(void *private, struct sock *sk); @@ -62,6 +66,8 @@ struct af_alg_sgl { int af_alg_register_type(const struct af_alg_type *type); int af_alg_unregister_type(const struct af_alg_type *type); +void af_alg_sk_destruct_child(struct sock *sk); + int af_alg_release(struct socket *sock); int af_alg_accept(struct sock *sk, struct socket *newsock); @@ -74,16 +80,17 @@ int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con); int af_alg_wait_for_completion(int err, struct af_alg_completion *completion); void af_alg_complete(struct crypto_async_request *req, int err); +#ifdef CONFIG_AUDIT +int af_alg_audit_crypto_op(struct sock *sk, const char *operation, int ctx2); +#else +#define af_alg_audit_crypto_op(sk, operation, ctx2) (0) +#endif + static inline struct alg_sock *alg_sk(struct sock *sk) { return (struct alg_sock *)sk; } -static inline void af_alg_release_parent(struct sock *sk) -{ - sock_put(alg_sk(sk)->parent); -} - static inline void af_alg_init_completion(struct af_alg_completion *completion) { init_completion(&completion->completion); |