aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-12-21 09:50:22 -0500
committerLibravatar GitHub <noreply@github.com>2023-12-21 09:50:22 -0500
commitc245fec2d475b86c03fd8c8a6b9013ed5bdab91b (patch)
tree5f76b7f8ec59519d15c40f5260fb7e8711f847f4 /etc
parentMerge pull request #6118 from NetSysFire/patch-4 (diff)
parentlandlock: move commands into profile and add landlock.enforce (diff)
downloadfirejail-c245fec2d475b86c03fd8c8a6b9013ed5bdab91b.tar.gz
firejail-c245fec2d475b86c03fd8c8a6b9013ed5bdab91b.tar.zst
firejail-c245fec2d475b86c03fd8c8a6b9013ed5bdab91b.zip
Merge pull request #6125 from kmk3/landlock-enforce
landlock: move commands into profile and add landlock.enforce
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/landlock-common.inc39
-rw-r--r--etc/profile-a-l/default.profile2
-rw-r--r--etc/templates/profile.template7
3 files changed, 48 insertions, 0 deletions
diff --git a/etc/inc/landlock-common.inc b/etc/inc/landlock-common.inc
new file mode 100644
index 000000000..ebe9f98dc
--- /dev/null
+++ b/etc/inc/landlock-common.inc
@@ -0,0 +1,39 @@
1# This file is overwritten during software install.
2# Persistent customizations should go in a .local file.
3include landlock-common.local
4
5landlock.read / # whole system read
6landlock.read /proc
7landlock.special / # sockets etc.
8
9# write access
10landlock.write ${HOME}
11landlock.write ${RUNUSER}
12landlock.write /dev
13landlock.write /proc
14landlock.write /run/shm
15landlock.write /tmp
16
17# exec access
18## misc
19landlock.execute /opt
20landlock.execute /run/firejail # appimage and various firejail features
21## bin
22landlock.execute /bin
23landlock.execute /sbin
24landlock.execute /usr/bin
25landlock.execute /usr/sbin
26landlock.execute /usr/games
27landlock.execute /usr/local/bin
28landlock.execute /usr/local/sbin
29landlock.execute /usr/local/games
30## lib
31landlock.execute /lib
32landlock.execute /lib32
33landlock.execute /libx32
34landlock.execute /lib64
35landlock.execute /usr/lib
36landlock.execute /usr/lib32
37landlock.execute /usr/libx32
38landlock.execute /usr/lib64
39landlock.execute /usr/local/lib
diff --git a/etc/profile-a-l/default.profile b/etc/profile-a-l/default.profile
index c071da4b7..b0ae2d49f 100644
--- a/etc/profile-a-l/default.profile
+++ b/etc/profile-a-l/default.profile
@@ -22,6 +22,8 @@ include disable-programs.inc
22#include whitelist-usr-share-common.inc 22#include whitelist-usr-share-common.inc
23#include whitelist-var-common.inc 23#include whitelist-var-common.inc
24 24
25include landlock-common.inc
26
25#apparmor 27#apparmor
26caps.drop all 28caps.drop all
27#ipc-namespace 29#ipc-namespace
diff --git a/etc/templates/profile.template b/etc/templates/profile.template
index 6299d42cd..8882c9012 100644
--- a/etc/templates/profile.template
+++ b/etc/templates/profile.template
@@ -137,6 +137,13 @@ include globals.local
137#include whitelist-usr-share-common.inc 137#include whitelist-usr-share-common.inc
138#include whitelist-var-common.inc 138#include whitelist-var-common.inc
139 139
140# Landlock commands
141##landlock.read PATH
142##landlock.write PATH
143##landlock.special PATH
144##landlock.execute PATH
145#include landlock-common.inc
146
140##allusers 147##allusers
141#apparmor 148#apparmor
142#caps.drop all 149#caps.drop all