Re: [PATCH v6 11/17] seltests/landlock: adds tests for bind() hooks
From: Mickaël Salaün <mic@digikod.net>
Date: 2022-07-28 13:24:43
Also in:
linux-security-module, netfilter-devel
From: Mickaël Salaün <mic@digikod.net>
Date: 2022-07-28 13:24:43
Also in:
linux-security-module, netfilter-devel
On 21/06/2022 10:23, Konstantin Meskhidze wrote:
Adds selftests for bind() socket action.
The first is with no landlock restrictions:
- bind without restrictions for ip4;
- bind without restrictions for ip6;
The second ones is with mixed landlock rules:
- bind with restrictions for ip4;
- bind with restrictions for ip6;
Signed-off-by: Konstantin Meskhidze <redacted>
---
Changes since v5:
* Splits commit.
* Adds local address 127.0.0.1.
* Adds FIXTURE_VARIANT and FIXTURE_VARIANT_ADD
helpers to support both ip4 and ip6 family tests and
shorten the code.
* Adds create_socket_variant() and bind_variant() helpers.
* Gets rid of reuse_addr variable in create_socket_variant.
* Formats code with clang-format-14.It seems that a formatting pass is missing for FIXTURE_VARIANT().