diff options
author | Guillaume Nault <gnault@redhat.com> | 2023-07-11 15:06:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-07-14 08:27:33 +0100 |
commit | 5b52ad34f9487b2c2d1e60fe37e5bd5656b4dac8 (patch) | |
tree | 8ab0e8d94ab54af6904da1725cb26775ada6f727 /include/linux/lsm_hook_defs.h | |
parent | def3833fc6022c7f23bd4fd66ba5ed65c6b23272 (diff) | |
download | lwn-5b52ad34f9487b2c2d1e60fe37e5bd5656b4dac8.tar.gz lwn-5b52ad34f9487b2c2d1e60fe37e5bd5656b4dac8.zip |
security: Constify sk in the sk_getsecid hook.
The sk_getsecid hook shouldn't need to modify its socket argument.
Make it const so that callers of security_sk_classify_flow() can use a
const struct sock *.
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/lsm_hook_defs.h')
-rw-r--r-- | include/linux/lsm_hook_defs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h index 7308a1a7599b..4f2621e87634 100644 --- a/include/linux/lsm_hook_defs.h +++ b/include/linux/lsm_hook_defs.h @@ -316,7 +316,7 @@ LSM_HOOK(int, 0, sk_alloc_security, struct sock *sk, int family, gfp_t priority) LSM_HOOK(void, LSM_RET_VOID, sk_free_security, struct sock *sk) LSM_HOOK(void, LSM_RET_VOID, sk_clone_security, const struct sock *sk, struct sock *newsk) -LSM_HOOK(void, LSM_RET_VOID, sk_getsecid, struct sock *sk, u32 *secid) +LSM_HOOK(void, LSM_RET_VOID, sk_getsecid, const struct sock *sk, u32 *secid) LSM_HOOK(void, LSM_RET_VOID, sock_graft, struct sock *sk, struct socket *parent) LSM_HOOK(int, 0, inet_conn_request, const struct sock *sk, struct sk_buff *skb, struct request_sock *req) |