summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2026-05-13 18:18:53 +0300
committerMickaël Salaün <mic@digikod.net>2026-06-14 00:14:59 +0300
commit143c656e2588b60e69df4287131413dab93ff53c (patch)
tree597003731c3cf4dde424de88da5fc19dbcc50fd4 /include
parentb232bd12789fa57405b5092f28788be97aae9999 (diff)
downloadlinux-143c656e2588b60e69df4287131413dab93ff53c.tar.xz
landlock: Demonstrate best-effort allowed_access filtering
Landlock provides best-effort sandboxing across ABI versions: applications request the rights they need, and on older kernels the unsupported rights are silently dropped from handled_access_* by the documented compatibility switch. The recommended pattern for landlock_add_rule(2) calls is to mirror this filtering at the rule level, which wasn't explicitly described in the exemple. Show the pattern explicitly in the filesystem and network rule examples by masking each rule's allowed_access against the ruleset's handled_access_* and adding the rule only when at least one bit remains set. This makes the recommended best-effort pattern self-documenting. Reviewed-by: Günther Noack <gnoack3000@gmail.com> Link: https://patch.msgid.link/20260513151856.148423-1-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions