Ondrej Mosnacek 5a287d3d2b lsm: fix default return value of the socket_getpeersec_*() hooks
For these hooks the true "neutral" value is -EOPNOTSUPP, which is
currently what is returned when no LSM provides this hook and what LSMs
return when there is no security context set on the socket. Correct the
value in <linux/lsm_hooks.h> and adjust the dispatch functions in
security/security.c to avoid issues when the BPF LSM is enabled.

Cc: stable@vger.kernel.org
Fixes: 98e828a0650f ("security: Refactor declaration of LSM hooks")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
[PM: subject line tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>
2024-01-30 17:01:54 -05:00
..
2024-01-18 15:16:57 -08:00
2024-01-12 11:32:19 -08:00
2024-01-20 15:03:25 -08:00
2024-01-11 10:07:29 -08:00
2024-01-17 15:21:21 -08:00
2024-01-16 17:37:17 +01:00
2024-01-19 09:10:23 -08:00
2024-01-18 16:44:03 -08:00