aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
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/profile-m-z/minecraft-launcher.profile7
-rw-r--r--etc/profile-m-z/obs.profile3
-rw-r--r--etc/templates/profile.template7
5 files changed, 57 insertions, 1 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/profile-m-z/minecraft-launcher.profile b/etc/profile-m-z/minecraft-launcher.profile
index 4f2c89b27..15adbcb36 100644
--- a/etc/profile-m-z/minecraft-launcher.profile
+++ b/etc/profile-m-z/minecraft-launcher.profile
@@ -25,6 +25,8 @@ include disable-xdg.inc
25 25
26mkdir ${HOME}/.minecraft 26mkdir ${HOME}/.minecraft
27whitelist ${HOME}/.minecraft 27whitelist ${HOME}/.minecraft
28# Needs keyring access in order to save logins
29whitelist ${RUNUSER}/keyring
28include whitelist-common.inc 30include whitelist-common.inc
29include whitelist-runuser-common.inc 31include whitelist-runuser-common.inc
30include whitelist-usr-share-common.inc 32include whitelist-usr-share-common.inc
@@ -54,7 +56,10 @@ private-etc @tls-ca,@x11,host.conf,java*,mime.types,services,timezone
54private-opt minecraft-launcher 56private-opt minecraft-launcher
55private-tmp 57private-tmp
56 58
57dbus-user none 59dbus-user filter
60dbus-user.talk org.freedesktop.secrets
61dbus-user.talk org.gnome.keyring.*
62dbus-user.talk org.gnome.seahorse.*
58dbus-system none 63dbus-system none
59 64
60restrict-namespaces 65restrict-namespaces
diff --git a/etc/profile-m-z/obs.profile b/etc/profile-m-z/obs.profile
index 82e7a4137..dbcc07809 100644
--- a/etc/profile-m-z/obs.profile
+++ b/etc/profile-m-z/obs.profile
@@ -10,6 +10,9 @@ noblacklist ${MUSIC}
10noblacklist ${PICTURES} 10noblacklist ${PICTURES}
11noblacklist ${VIDEOS} 11noblacklist ${VIDEOS}
12 12
13# Allow lua (blacklisted by disable-interpreters.inc)
14include allow-lua.inc
15
13# Allow python (blacklisted by disable-interpreters.inc) 16# Allow python (blacklisted by disable-interpreters.inc)
14include allow-python2.inc 17include allow-python2.inc
15include allow-python3.inc 18include allow-python3.inc
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