]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
landlock: Refactor TCP socket type check
authorMatthieu Buffet <matthieu@buffet.re>
Fri, 12 Dec 2025 16:36:58 +0000 (17:36 +0100)
committerMickaël Salaün <mic@digikod.net>
Fri, 6 Feb 2026 16:54:41 +0000 (17:54 +0100)
commitd90ba69e3335aba96c25a0ea7d46c5c115cd4756
tree99ae3a8bef69d917459b6b36d27a24eaac7c1b42
parentbbb6f53e905ca119f99ccab8496f8921d9db9c50
landlock: Refactor TCP socket type check

Move the socket type check earlier, so that we will later be able to add
elseifs for other types. Ordering of checks (socket is of a type we
enforce restrictions on) / (current creds have Landlock restrictions)
should not change anything.

Signed-off-by: Matthieu Buffet <matthieu@buffet.re>
Link: https://lore.kernel.org/r/20251212163704.142301-3-matthieu@buffet.re
Signed-off-by: Mickaël Salaün <mic@digikod.net>
security/landlock/net.c