samples/landlock: Extend sample tool to support LANDLOCK_ACCESS_FS_TRUNCATE
authorGünther Noack <gnoack3000@gmail.com>
Tue, 18 Oct 2022 18:22:15 +0000 (20:22 +0200)
committerMickaël Salaün <mic@digikod.net>
Wed, 19 Oct 2022 07:01:47 +0000 (09:01 +0200)
commitfaeb9197669c23d983f6485d278b20f0194432f4
tree7b237d996b8d075d38078dedc47d0522b533285a
parent0d8c658be264eb2106349c50377ef8a81edc0106
samples/landlock: Extend sample tool to support LANDLOCK_ACCESS_FS_TRUNCATE

Update the sandboxer sample to restrict truncate actions. This is
automatically enabled by default if the running kernel supports
LANDLOCK_ACCESS_FS_TRUNCATE, except for the paths listed in the
LL_FS_RW environment variable.

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20221018182216.301684-11-gnoack3000@gmail.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
samples/landlock/sandboxer.c