aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-02-01 23:21:26 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-02-02 19:37:06 -0300
commitf70ffbe76cd06c03442132f06d503846a415f24c (patch)
treef48b2cf278c3b60717ca9ff3b9c3dd26ab2c7ef2 /etc
parentcrawl.profile: allow lua (#6182) (diff)
downloadfirejail-f70ffbe76cd06c03442132f06d503846a415f24c.tar.gz
firejail-f70ffbe76cd06c03442132f06d503846a415f24c.tar.zst
firejail-f70ffbe76cd06c03442132f06d503846a415f24c.zip
landlock: split .special into .makeipc and .makedev
As discussed with @topimiettinen[1], it is unlikely that an unprivileged process would need to directly create block or character devices. Also, `landlock.special` is not very descriptive of what it allows. So split `landlock.special` into: * `landlock.makeipc`: allow creating named pipes and sockets (which are usually used for inter-process communication) * `landlock.makedev`: allow creating block and character devices Misc: The `makedev` name is based on `nodev` from mount(8), which makes mount not interpret block and character devices. `ipc` was suggested by @rusty-snake[2]. Relates to #6078. [1] https://github.com/netblue30/firejail/pull/6078#pullrequestreview-1740569786 [2] https://github.com/netblue30/firejail/pull/6187#issuecomment-1924107294
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/landlock-common.inc2
-rw-r--r--etc/templates/profile.template3
2 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/landlock-common.inc b/etc/inc/landlock-common.inc
index ebe9f98dc..694d447b5 100644
--- a/etc/inc/landlock-common.inc
+++ b/etc/inc/landlock-common.inc
@@ -4,7 +4,7 @@ include landlock-common.local
4 4
5landlock.read / # whole system read 5landlock.read / # whole system read
6landlock.read /proc 6landlock.read /proc
7landlock.special / # sockets etc. 7landlock.makeipc / # sockets etc.
8 8
9# write access 9# write access
10landlock.write ${HOME} 10landlock.write ${HOME}
diff --git a/etc/templates/profile.template b/etc/templates/profile.template
index 8882c9012..0e6a5734e 100644
--- a/etc/templates/profile.template
+++ b/etc/templates/profile.template
@@ -140,7 +140,8 @@ include globals.local
140# Landlock commands 140# Landlock commands
141##landlock.read PATH 141##landlock.read PATH
142##landlock.write PATH 142##landlock.write PATH
143##landlock.special PATH 143##landlock.makeipc PATH
144##landlock.makedev PATH
144##landlock.execute PATH 145##landlock.execute PATH
145#include landlock-common.inc 146#include landlock-common.inc
146 147