samples/landlock: Add support for file reparenting
authorMickaël Salaün <mic@digikod.net>
Fri, 6 May 2022 16:10:59 +0000 (18:10 +0200)
committerMickaël Salaün <mic@digikod.net>
Mon, 23 May 2022 11:28:00 +0000 (13:28 +0200)
commit76b902f874ff4de9c1078489d4c7678a64105ea6
tree2b890621d9978d414c76f83952e29608833b88c1
parentf4056b9266b571c63f30cda70c2d89f7b7e8bb7b
samples/landlock: Add support for file reparenting

Add LANDLOCK_ACCESS_FS_REFER to the "roughly write" access rights and
leverage the Landlock ABI version to only try to enforce it if it is
supported by the running kernel.

Reviewed-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Link: https://lore.kernel.org/r/20220506161102.525323-10-mic@digikod.net
samples/landlock/sandboxer.c