aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-02-06 08:46:28 -0500
committerLibravatar GitHub <noreply@github.com>2023-02-06 08:46:28 -0500
commit4194ebfb757b7dd0ae81e0683b88477c769aad26 (patch)
tree6022f6aa0be84f1cd895f46704d24d392630d87e
parentxiphos: fix private-etc (diff)
parentprivate-etc: java directory fixes (diff)
downloadfirejail-4194ebfb757b7dd0ae81e0683b88477c769aad26.tar.gz
firejail-4194ebfb757b7dd0ae81e0683b88477c769aad26.tar.zst
firejail-4194ebfb757b7dd0ae81e0683b88477c769aad26.zip
Merge branch 'master' into private-etc-fixes
-rw-r--r--etc/profile-a-l/anki.profile2
-rw-r--r--etc/profile-a-l/celluloid.profile2
-rw-r--r--etc/profile-a-l/chatterino.profile2
-rw-r--r--etc/profile-a-l/dolphin-emu.profile2
-rw-r--r--etc/profile-a-l/equalx.profile2
-rw-r--r--etc/profile-a-l/falkon.profile2
-rw-r--r--etc/profile-a-l/fractal.profile2
-rw-r--r--etc/profile-a-l/freemind.profile2
-rw-r--r--etc/profile-a-l/git-cola.profile2
-rw-r--r--etc/profile-a-l/gnome-music.profile2
-rw-r--r--etc/profile-a-l/homebank.profile2
-rw-r--r--etc/profile-a-l/i2prouter.profile2
-rw-r--r--etc/profile-a-l/kazam.profile2
-rw-r--r--etc/profile-a-l/kube.profile2
-rw-r--r--etc/profile-m-z/man.profile2
-rw-r--r--etc/profile-m-z/menulibre.profile2
-rw-r--r--etc/profile-m-z/minecraft-launcher.profile2
-rw-r--r--etc/profile-m-z/minitube.profile2
-rw-r--r--etc/profile-m-z/mirage.profile2
-rw-r--r--etc/profile-m-z/musictube.profile2
-rw-r--r--etc/profile-m-z/mutt.profile2
-rw-r--r--etc/profile-m-z/neochat.profile2
-rw-r--r--etc/profile-m-z/neomutt.profile2
-rw-r--r--etc/profile-m-z/nextcloud.profile2
-rw-r--r--etc/profile-m-z/nheko.profile2
-rw-r--r--etc/profile-m-z/nuclear.profile2
-rw-r--r--etc/profile-m-z/onboard.profile2
-rw-r--r--etc/profile-m-z/openarena.profile2
-rw-r--r--etc/profile-m-z/openmw.profile2
-rw-r--r--etc/profile-m-z/otter-browser.profile2
-rw-r--r--etc/profile-m-z/psi.profile2
-rw-r--r--etc/profile-m-z/pybitmessage.profile2
-rw-r--r--etc/profile-m-z/qcomicbook.profile2
-rw-r--r--etc/profile-m-z/qgis.profile2
-rw-r--r--etc/profile-m-z/quaternion.profile2
-rw-r--r--etc/profile-m-z/signal-cli.profile2
-rw-r--r--etc/profile-m-z/smuxi-frontend-gnome.profile2
-rw-r--r--etc/profile-m-z/spectral.profile2
-rw-r--r--etc/profile-m-z/terasology.profile2
-rw-r--r--etc/profile-m-z/trojita.profile2
-rw-r--r--etc/profile-m-z/twitch.profile2
-rw-r--r--etc/profile-m-z/youtube.profile2
-rw-r--r--etc/profile-m-z/youtubemusic-nativefier.profile2
-rw-r--r--etc/profile-m-z/ytmdesktop.profile2
-rw-r--r--etc/profile-m-z/zeal.profile2
-rw-r--r--src/include/etc_groups.h2
-rw-r--r--src/tools/cleanup_etc.c66
47 files changed, 95 insertions, 63 deletions
diff --git a/etc/profile-a-l/anki.profile b/etc/profile-a-l/anki.profile
index 442b5a481..2d0bfcb6c 100644
--- a/etc/profile-a-l/anki.profile
+++ b/etc/profile-a-l/anki.profile
@@ -49,7 +49,7 @@ disable-mnt
49private-bin anki,python* 49private-bin anki,python*
50private-cache 50private-cache
51private-dev 51private-dev
52private-etc @tls-ca,@x11,Trolltech.conf 52private-etc @tls-ca,@x11
53private-tmp 53private-tmp
54 54
55dbus-user none 55dbus-user none
diff --git a/etc/profile-a-l/celluloid.profile b/etc/profile-a-l/celluloid.profile
index f06ac3b01..7b0f7bdf0 100644
--- a/etc/profile-a-l/celluloid.profile
+++ b/etc/profile-a-l/celluloid.profile
@@ -52,7 +52,7 @@ tracelog
52 52
53private-bin celluloid,env,gnome-mpv,python*,youtube-dl 53private-bin celluloid,env,gnome-mpv,python*,youtube-dl
54private-cache 54private-cache
55private-etc @tls-ca,@x11,libva.conf,pkcs11,selinux 55private-etc @tls-ca,@x11,libva.conf,pkcs11
56private-dev 56private-dev
57private-tmp 57private-tmp
58 58
diff --git a/etc/profile-a-l/chatterino.profile b/etc/profile-a-l/chatterino.profile
index ed3153ec7..2df03b10b 100644
--- a/etc/profile-a-l/chatterino.profile
+++ b/etc/profile-a-l/chatterino.profile
@@ -70,7 +70,7 @@ private-bin chatterino,cvlc,env,ffmpeg,mpv,nvlc,pgrep,python*,qvlc,rvlc,streamli
70# private-cache may cause issues with mpv (see #2838) 70# private-cache may cause issues with mpv (see #2838)
71private-cache 71private-cache
72private-dev 72private-dev
73private-etc @tls-ca,@x11,dbus-1,rpc,services,Trolltech.conf 73private-etc @tls-ca,@x11,dbus-1,rpc,services
74private-srv none 74private-srv none
75private-tmp 75private-tmp
76 76
diff --git a/etc/profile-a-l/dolphin-emu.profile b/etc/profile-a-l/dolphin-emu.profile
index d4734bf22..9743ebfbd 100644
--- a/etc/profile-a-l/dolphin-emu.profile
+++ b/etc/profile-a-l/dolphin-emu.profile
@@ -54,7 +54,7 @@ private-bin bash,dolphin-emu,dolphin-emu-x11,sh
54private-cache 54private-cache
55# Add the next line to your dolphin-emu.local if you do not need controller support. 55# Add the next line to your dolphin-emu.local if you do not need controller support.
56#private-dev 56#private-dev
57private-etc @tls-ca,@x11,bumblebee,gconf,glvnd,host.conf,mime.types,rpc,services,Trolltech.conf 57private-etc @tls-ca,@x11,bumblebee,gconf,glvnd,host.conf,mime.types,rpc,services
58private-opt none 58private-opt none
59private-tmp 59private-tmp
60 60
diff --git a/etc/profile-a-l/equalx.profile b/etc/profile-a-l/equalx.profile
index fa6674f6e..8cbdccbb5 100644
--- a/etc/profile-a-l/equalx.profile
+++ b/etc/profile-a-l/equalx.profile
@@ -53,7 +53,7 @@ disable-mnt
53private-bin equalx,gs,pdflatex,pdftocairo 53private-bin equalx,gs,pdflatex,pdftocairo
54private-cache 54private-cache
55private-dev 55private-dev
56private-etc @x11,equalx,equalx.conf,latexmk.conf,papersize,texlive,Trolltech.conf 56private-etc @x11,equalx,equalx.conf,latexmk.conf,papersize,texlive
57private-tmp 57private-tmp
58 58
59dbus-user none 59dbus-user none
diff --git a/etc/profile-a-l/falkon.profile b/etc/profile-a-l/falkon.profile
index 0d260f429..d805766eb 100644
--- a/etc/profile-a-l/falkon.profile
+++ b/etc/profile-a-l/falkon.profile
@@ -47,7 +47,7 @@ disable-mnt
47# private-bin falkon 47# private-bin falkon
48private-cache 48private-cache
49private-dev 49private-dev
50private-etc @tls-ca,@x11,adobe,mailcap,mime.types,selinux 50private-etc @tls-ca,@x11,adobe,mailcap,mime.types
51private-tmp 51private-tmp
52 52
53# dbus-user filter 53# dbus-user filter
diff --git a/etc/profile-a-l/fractal.profile b/etc/profile-a-l/fractal.profile
index 24d8e4c2f..fe0bc8756 100644
--- a/etc/profile-a-l/fractal.profile
+++ b/etc/profile-a-l/fractal.profile
@@ -46,7 +46,7 @@ disable-mnt
46private-bin fractal 46private-bin fractal
47private-cache 47private-cache
48private-dev 48private-dev
49private-etc @tls-ca,@x11,host.conf,mime.types,selinux 49private-etc @tls-ca,@x11,host.conf,mime.types
50private-tmp 50private-tmp
51 51
52dbus-user filter 52dbus-user filter
diff --git a/etc/profile-a-l/freemind.profile b/etc/profile-a-l/freemind.profile
index ae5843f7f..9bf5a14be 100644
--- a/etc/profile-a-l/freemind.profile
+++ b/etc/profile-a-l/freemind.profile
@@ -43,7 +43,7 @@ disable-mnt
43private-bin bash,cp,dirname,dpkg,echo,freemind,grep,java,lsb_release,mkdir,readlink,rpm,sed,sh,uname,which 43private-bin bash,cp,dirname,dpkg,echo,freemind,grep,java,lsb_release,mkdir,readlink,rpm,sed,sh,uname,which
44private-cache 44private-cache
45private-dev 45private-dev
46#private-etc alternatives,fonts,java 46#private-etc alternatives,fonts,java*
47private-tmp 47private-tmp
48private-opt none 48private-opt none
49private-srv none 49private-srv none
diff --git a/etc/profile-a-l/git-cola.profile b/etc/profile-a-l/git-cola.profile
index 34203ad4a..49568ba23 100644
--- a/etc/profile-a-l/git-cola.profile
+++ b/etc/profile-a-l/git-cola.profile
@@ -69,7 +69,7 @@ tracelog
69private-bin basename,bash,cola,envsubst,gettext,git,git-cola,git-dag,git-gui,gitk,gpg,gpg-agent,nano,ps,python*,sh,ssh,ssh-agent,tclsh,tr,wc,which,xed 69private-bin basename,bash,cola,envsubst,gettext,git,git-cola,git-dag,git-gui,gitk,gpg,gpg-agent,nano,ps,python*,sh,ssh,ssh-agent,tclsh,tr,wc,which,xed
70private-cache 70private-cache
71private-dev 71private-dev
72private-etc @tls-ca,@x11,gitconfig,host.conf,mime.types,selinux,ssh 72private-etc @tls-ca,@x11,gitconfig,host.conf,mime.types,ssh
73private-tmp 73private-tmp
74writable-run-user 74writable-run-user
75 75
diff --git a/etc/profile-a-l/gnome-music.profile b/etc/profile-a-l/gnome-music.profile
index 087353d45..22d5f87ea 100644
--- a/etc/profile-a-l/gnome-music.profile
+++ b/etc/profile-a-l/gnome-music.profile
@@ -41,7 +41,7 @@ tracelog
41# private-bin calls a file manager - whatever is installed! 41# private-bin calls a file manager - whatever is installed!
42#private-bin env,gio-launch-desktop,gnome-music,python*,yelp 42#private-bin env,gio-launch-desktop,gnome-music,python*,yelp
43private-dev 43private-dev
44private-etc @x11,selinux 44private-etc @x11
45private-tmp 45private-tmp
46 46
47restrict-namespaces 47restrict-namespaces
diff --git a/etc/profile-a-l/homebank.profile b/etc/profile-a-l/homebank.profile
index ffe65c762..ccbb66333 100644
--- a/etc/profile-a-l/homebank.profile
+++ b/etc/profile-a-l/homebank.profile
@@ -49,7 +49,7 @@ disable-mnt
49private-bin homebank 49private-bin homebank
50private-cache 50private-cache
51private-dev 51private-dev
52private-etc @tls-ca,@x11,mime.types,selinux 52private-etc @tls-ca,@x11,mime.types
53private-tmp 53private-tmp
54 54
55dbus-user none 55dbus-user none
diff --git a/etc/profile-a-l/i2prouter.profile b/etc/profile-a-l/i2prouter.profile
index e295729d7..6ee92e986 100644
--- a/etc/profile-a-l/i2prouter.profile
+++ b/etc/profile-a-l/i2prouter.profile
@@ -67,7 +67,7 @@ seccomp
67disable-mnt 67disable-mnt
68private-cache 68private-cache
69private-dev 69private-dev
70private-etc @tls-ca,@x11,i2p,java-10-openjdk,java-11-openjdk,java-12-openjdk,java-13-openjdk,java-8-openjdk,java-9-openjdk,java-openjdk 70private-etc @tls-ca,@x11,i2p,java*
71private-tmp 71private-tmp
72 72
73restrict-namespaces 73restrict-namespaces
diff --git a/etc/profile-a-l/kazam.profile b/etc/profile-a-l/kazam.profile
index 0ed2cf48a..70414eeea 100644
--- a/etc/profile-a-l/kazam.profile
+++ b/etc/profile-a-l/kazam.profile
@@ -48,7 +48,7 @@ disable-mnt
48# private-bin kazam,python* 48# private-bin kazam,python*
49private-cache 49private-cache
50private-dev 50private-dev
51private-etc @x11,selinux 51private-etc @x11
52private-tmp 52private-tmp
53 53
54dbus-system none 54dbus-system none
diff --git a/etc/profile-a-l/kube.profile b/etc/profile-a-l/kube.profile
index 7204549e2..5183a9327 100644
--- a/etc/profile-a-l/kube.profile
+++ b/etc/profile-a-l/kube.profile
@@ -67,7 +67,7 @@ tracelog
67private-bin kube,sink_synchronizer 67private-bin kube,sink_synchronizer
68private-cache 68private-cache
69private-dev 69private-dev
70private-etc @tls-ca,@x11,selinux 70private-etc @tls-ca,@x11
71private-tmp 71private-tmp
72writable-run-user 72writable-run-user
73 73
diff --git a/etc/profile-m-z/man.profile b/etc/profile-m-z/man.profile
index 6cb523727..cdf1d807f 100644
--- a/etc/profile-m-z/man.profile
+++ b/etc/profile-m-z/man.profile
@@ -56,7 +56,7 @@ disable-mnt
56#private-bin apropos,bash,cat,catman,col,gpreconv,groff,grotty,gunzip,gzip,less,man,most,nroff,preconv,sed,sh,tbl,tr,troff,whatis,which,xtotroff,zcat,zsoelim 56#private-bin apropos,bash,cat,catman,col,gpreconv,groff,grotty,gunzip,gzip,less,man,most,nroff,preconv,sed,sh,tbl,tr,troff,whatis,which,xtotroff,zcat,zsoelim
57private-cache 57private-cache
58private-dev 58private-dev
59private-etc @x11,groff,man_db.conf,manpath.config,selinux,sysless 59private-etc @x11,groff,man_db.conf,manpath.config,sysless
60#private-tmp 60#private-tmp
61 61
62dbus-user none 62dbus-user none
diff --git a/etc/profile-m-z/menulibre.profile b/etc/profile-m-z/menulibre.profile
index a67ef9101..fcac70fb3 100644
--- a/etc/profile-m-z/menulibre.profile
+++ b/etc/profile-m-z/menulibre.profile
@@ -51,7 +51,7 @@ tracelog
51disable-mnt 51disable-mnt
52private-cache 52private-cache
53private-dev 53private-dev
54private-etc @tls-ca,@x11,mime.types,selinux 54private-etc @tls-ca,@x11,mime.types
55private-tmp 55private-tmp
56 56
57dbus-user none 57dbus-user none
diff --git a/etc/profile-m-z/minecraft-launcher.profile b/etc/profile-m-z/minecraft-launcher.profile
index 86378527b..4f2c89b27 100644
--- a/etc/profile-m-z/minecraft-launcher.profile
+++ b/etc/profile-m-z/minecraft-launcher.profile
@@ -50,7 +50,7 @@ private-cache
50private-dev 50private-dev
51# If multiplayer or realms break, add 'private-etc <your-own-java-folder-from-/etc>' 51# If multiplayer or realms break, add 'private-etc <your-own-java-folder-from-/etc>'
52# or 'ignore private-etc' to your minecraft-launcher.local. 52# or 'ignore private-etc' to your minecraft-launcher.local.
53private-etc @tls-ca,@x11,host.conf,java-10-openjdk,java-11-openjdk,java-12-openjdk,java-13-openjdk,java-14-openjdk,java-7-openjdk,java-8-openjdk,java-9-openjdk,java-openjdk,mime.types,selinux,services,timezone 53private-etc @tls-ca,@x11,host.conf,java*,mime.types,services,timezone
54private-opt minecraft-launcher 54private-opt minecraft-launcher
55private-tmp 55private-tmp
56 56
diff --git a/etc/profile-m-z/minitube.profile b/etc/profile-m-z/minitube.profile
index 20e956cff..9e72f9996 100644
--- a/etc/profile-m-z/minitube.profile
+++ b/etc/profile-m-z/minitube.profile
@@ -53,7 +53,7 @@ disable-mnt
53private-bin minitube 53private-bin minitube
54private-cache 54private-cache
55private-dev 55private-dev
56private-etc @tls-ca,@x11,host.conf,mime.types,selinux 56private-etc @tls-ca,@x11,host.conf,mime.types
57private-tmp 57private-tmp
58 58
59dbus-user none 59dbus-user none
diff --git a/etc/profile-m-z/mirage.profile b/etc/profile-m-z/mirage.profile
index 7c5b3aee4..665b32ecf 100644
--- a/etc/profile-m-z/mirage.profile
+++ b/etc/profile-m-z/mirage.profile
@@ -53,7 +53,7 @@ disable-mnt
53private-bin ldconfig,mirage 53private-bin ldconfig,mirage
54private-cache 54private-cache
55private-dev 55private-dev
56private-etc @tls-ca,@x11,host.conf,mime.types,selinux 56private-etc @tls-ca,@x11,host.conf,mime.types
57private-tmp 57private-tmp
58 58
59dbus-user none 59dbus-user none
diff --git a/etc/profile-m-z/musictube.profile b/etc/profile-m-z/musictube.profile
index 0da6a8c3d..3387ed5de 100644
--- a/etc/profile-m-z/musictube.profile
+++ b/etc/profile-m-z/musictube.profile
@@ -49,7 +49,7 @@ disable-mnt
49private-bin musictube 49private-bin musictube
50private-cache 50private-cache
51private-dev 51private-dev
52private-etc @tls-ca,@x11,host.conf,mime.types,selinux 52private-etc @tls-ca,@x11,host.conf,mime.types
53private-tmp 53private-tmp
54 54
55dbus-user none 55dbus-user none
diff --git a/etc/profile-m-z/mutt.profile b/etc/profile-m-z/mutt.profile
index c96dca73a..288ffedf1 100644
--- a/etc/profile-m-z/mutt.profile
+++ b/etc/profile-m-z/mutt.profile
@@ -124,7 +124,7 @@ tracelog
124# disable-mnt 124# disable-mnt
125private-cache 125private-cache
126private-dev 126private-dev
127private-etc @tls-ca,@x11,gai.conf,gnupg,gnutls,hosts.conf,mail,mailname,Mutt,Muttrc,Muttrc.d,nntpserver,terminfo 127private-etc @tls-ca,@x11,Mutt,Muttrc,Muttrc.d,gai.conf,gnupg,gnutls,hosts.conf,mail,mailname,nntpserver,terminfo
128private-tmp 128private-tmp
129writable-run-user 129writable-run-user
130writable-var 130writable-var
diff --git a/etc/profile-m-z/neochat.profile b/etc/profile-m-z/neochat.profile
index 244e01cc5..80e28a5e5 100644
--- a/etc/profile-m-z/neochat.profile
+++ b/etc/profile-m-z/neochat.profile
@@ -53,7 +53,7 @@ tracelog
53disable-mnt 53disable-mnt
54private-bin neochat 54private-bin neochat
55private-dev 55private-dev
56private-etc @tls-ca,@x11,dbus-1,host.conf,mime.types,rpc,services,Trolltech.conf 56private-etc @tls-ca,@x11,dbus-1,host.conf,mime.types,rpc,services
57private-tmp 57private-tmp
58 58
59dbus-user filter 59dbus-user filter
diff --git a/etc/profile-m-z/neomutt.profile b/etc/profile-m-z/neomutt.profile
index 4f311b155..5bd1e7cba 100644
--- a/etc/profile-m-z/neomutt.profile
+++ b/etc/profile-m-z/neomutt.profile
@@ -116,7 +116,7 @@ tracelog
116# disable-mnt 116# disable-mnt
117private-cache 117private-cache
118private-dev 118private-dev
119private-etc @tls-ca,@x11,gnupg,hosts.conf,mail,mailname,Mutt,Muttrc,Muttrc.d,neomuttrc,neomuttrc.d,nntpserver 119private-etc @tls-ca,@x11,Mutt,Muttrc,Muttrc.d,gnupg,hosts.conf,mail,mailname,neomuttrc,neomuttrc.d,nntpserver
120private-tmp 120private-tmp
121writable-run-user 121writable-run-user
122writable-var 122writable-var
diff --git a/etc/profile-m-z/nextcloud.profile b/etc/profile-m-z/nextcloud.profile
index 32a65f0c5..d4bad2f67 100644
--- a/etc/profile-m-z/nextcloud.profile
+++ b/etc/profile-m-z/nextcloud.profile
@@ -61,7 +61,7 @@ tracelog
61disable-mnt 61disable-mnt
62private-bin nextcloud,nextcloud-desktop 62private-bin nextcloud,nextcloud-desktop
63private-cache 63private-cache
64private-etc @tls-ca,@x11,host.conf,Nextcloud,os-release,selinux 64private-etc @tls-ca,@x11,Nextcloud,host.conf,os-release
65private-dev 65private-dev
66private-tmp 66private-tmp
67 67
diff --git a/etc/profile-m-z/nheko.profile b/etc/profile-m-z/nheko.profile
index a0565c77d..cdd2ffc3f 100644
--- a/etc/profile-m-z/nheko.profile
+++ b/etc/profile-m-z/nheko.profile
@@ -47,7 +47,7 @@ disable-mnt
47private-bin nheko 47private-bin nheko
48private-cache 48private-cache
49private-dev 49private-dev
50private-etc @tls-ca,@x11,host.conf,mime.types,selinux 50private-etc @tls-ca,@x11,host.conf,mime.types
51private-tmp 51private-tmp
52 52
53dbus-user filter 53dbus-user filter
diff --git a/etc/profile-m-z/nuclear.profile b/etc/profile-m-z/nuclear.profile
index 452cda5e5..6ab21af5b 100644
--- a/etc/profile-m-z/nuclear.profile
+++ b/etc/profile-m-z/nuclear.profile
@@ -18,7 +18,7 @@ whitelist ${HOME}/.config/nuclear
18no3d 18no3d
19 19
20# private-bin nuclear 20# private-bin nuclear
21private-etc @tls-ca,@x11,host.conf,mime.types,selinux 21private-etc @tls-ca,@x11,host.conf,mime.types
22private-opt nuclear 22private-opt nuclear
23 23
24# Redirect 24# Redirect
diff --git a/etc/profile-m-z/onboard.profile b/etc/profile-m-z/onboard.profile
index a142598b7..f8be5819b 100644
--- a/etc/profile-m-z/onboard.profile
+++ b/etc/profile-m-z/onboard.profile
@@ -49,7 +49,7 @@ disable-mnt
49private-cache 49private-cache
50private-bin onboard,python*,tput 50private-bin onboard,python*,tput
51private-dev 51private-dev
52private-etc @x11,dbus-1,mime.types,selinux 52private-etc @x11,dbus-1,mime.types
53private-tmp 53private-tmp
54 54
55dbus-system none 55dbus-system none
diff --git a/etc/profile-m-z/openarena.profile b/etc/profile-m-z/openarena.profile
index 1600db144..46d0bb86b 100644
--- a/etc/profile-m-z/openarena.profile
+++ b/etc/profile-m-z/openarena.profile
@@ -42,7 +42,7 @@ disable-mnt
42private-bin bash,cut,glxinfo,grep,head,openarena,openarena_ded,quake3,zenity 42private-bin bash,cut,glxinfo,grep,head,openarena,openarena_ded,quake3,zenity
43private-cache 43private-cache
44private-dev 44private-dev
45private-etc @games,@x11,selinux,udev 45private-etc @games,@x11,udev
46private-tmp 46private-tmp
47 47
48dbus-user none 48dbus-user none
diff --git a/etc/profile-m-z/openmw.profile b/etc/profile-m-z/openmw.profile
index 507d6d634..721b06117 100644
--- a/etc/profile-m-z/openmw.profile
+++ b/etc/profile-m-z/openmw.profile
@@ -52,7 +52,7 @@ tracelog
52private-bin bsatool,esmtool,niftest,openmw,openmw-cs,openmw-essimporter,openmw-iniimporter,openmw-launcher,openmw-wizard 52private-bin bsatool,esmtool,niftest,openmw,openmw-cs,openmw-essimporter,openmw-iniimporter,openmw-launcher,openmw-wizard
53private-cache 53private-cache
54private-dev 54private-dev
55private-etc @x11,bumblebee,glvnd,mime.types,openmw,Trolltech.conf 55private-etc @x11,bumblebee,glvnd,mime.types,openmw
56private-opt none 56private-opt none
57private-tmp 57private-tmp
58 58
diff --git a/etc/profile-m-z/otter-browser.profile b/etc/profile-m-z/otter-browser.profile
index 420ceece3..a1c0462ba 100644
--- a/etc/profile-m-z/otter-browser.profile
+++ b/etc/profile-m-z/otter-browser.profile
@@ -52,7 +52,7 @@ disable-mnt
52private-bin bash,otter-browser,sh,which 52private-bin bash,otter-browser,sh,which
53private-cache 53private-cache
54?BROWSER_DISABLE_U2F: private-dev 54?BROWSER_DISABLE_U2F: private-dev
55private-etc @tls-ca,@x11,mailcap,mime.types,selinux 55private-etc @tls-ca,@x11,mailcap,mime.types
56private-tmp 56private-tmp
57 57
58dbus-system none 58dbus-system none
diff --git a/etc/profile-m-z/psi.profile b/etc/profile-m-z/psi.profile
index 9d9d6e6c5..a1a0606b9 100644
--- a/etc/profile-m-z/psi.profile
+++ b/etc/profile-m-z/psi.profile
@@ -70,7 +70,7 @@ disable-mnt
70private-bin getopt,psi 70private-bin getopt,psi
71private-cache 71private-cache
72private-dev 72private-dev
73private-etc @tls-ca,@x11,selinux 73private-etc @tls-ca,@x11
74private-tmp 74private-tmp
75 75
76dbus-user none 76dbus-user none
diff --git a/etc/profile-m-z/pybitmessage.profile b/etc/profile-m-z/pybitmessage.profile
index e057ee565..0789450cb 100644
--- a/etc/profile-m-z/pybitmessage.profile
+++ b/etc/profile-m-z/pybitmessage.profile
@@ -40,7 +40,7 @@ seccomp
40disable-mnt 40disable-mnt
41private-bin bash,env,ldconfig,pybitmessage,python*,sh,stat 41private-bin bash,env,ldconfig,pybitmessage,python*,sh,stat
42private-dev 42private-dev
43private-etc @tls-ca,@x11,PyBitmessage,PyBitmessage.conf,selinux,sni-qt.conf,system-fips,Trolltech.conf 43private-etc @tls-ca,@x11,PyBitmessage,PyBitmessage.conf,sni-qt.conf,system-fips
44private-tmp 44private-tmp
45 45
46restrict-namespaces 46restrict-namespaces
diff --git a/etc/profile-m-z/qcomicbook.profile b/etc/profile-m-z/qcomicbook.profile
index cb807c69e..19ef7a464 100644
--- a/etc/profile-m-z/qcomicbook.profile
+++ b/etc/profile-m-z/qcomicbook.profile
@@ -52,7 +52,7 @@ tracelog
52private-bin 7z,7zr,qcomicbook,rar,sh,tar,unace,unrar,unzip 52private-bin 7z,7zr,qcomicbook,rar,sh,tar,unace,unrar,unzip
53private-cache 53private-cache
54private-dev 54private-dev
55private-etc @x11,mime.types,Trolltech.conf 55private-etc @x11,mime.types
56private-tmp 56private-tmp
57 57
58dbus-user none 58dbus-user none
diff --git a/etc/profile-m-z/qgis.profile b/etc/profile-m-z/qgis.profile
index 9635c2e06..1f378e004 100644
--- a/etc/profile-m-z/qgis.profile
+++ b/etc/profile-m-z/qgis.profile
@@ -51,7 +51,7 @@ tracelog
51disable-mnt 51disable-mnt
52private-cache 52private-cache
53private-dev 53private-dev
54private-etc @tls-ca,QGIS,QGIS.conf,Trolltech.conf 54private-etc @tls-ca,@x11,QGIS,QGIS.conf
55private-tmp 55private-tmp
56 56
57dbus-user none 57dbus-user none
diff --git a/etc/profile-m-z/quaternion.profile b/etc/profile-m-z/quaternion.profile
index ddd4800d8..fbc003d65 100644
--- a/etc/profile-m-z/quaternion.profile
+++ b/etc/profile-m-z/quaternion.profile
@@ -46,7 +46,7 @@ disable-mnt
46private-bin quaternion 46private-bin quaternion
47private-cache 47private-cache
48private-dev 48private-dev
49private-etc @tls-ca,@x11,host.conf,mime.types,selinux 49private-etc @tls-ca,@x11,host.conf,mime.types
50private-tmp 50private-tmp
51 51
52dbus-user none 52dbus-user none
diff --git a/etc/profile-m-z/signal-cli.profile b/etc/profile-m-z/signal-cli.profile
index d2b604df5..d881db714 100644
--- a/etc/profile-m-z/signal-cli.profile
+++ b/etc/profile-m-z/signal-cli.profile
@@ -46,7 +46,7 @@ private-bin java,sh,signal-cli
46private-cache 46private-cache
47private-dev 47private-dev
48# Does not work with all Java configurations. You will notice immediately, so you might want to give it a try 48# Does not work with all Java configurations. You will notice immediately, so you might want to give it a try
49#private-etc alternatives,ca-certificates,crypto-policies,dbus-1,host.conf,hostname,hosts,java-10-openjdk,java-7-openjdk,java-8-openjdk,java-9-openjdk,java.conf,machine-id,nsswitch.conf,passwd,pki,protocols,resolv.conf,rpc,services,ssl 49#private-etc alternatives,ca-certificates,crypto-policies,dbus-1,host.conf,hostname,hosts,java*,machine-id,nsswitch.conf,passwd,pki,protocols,resolv.conf,rpc,services,ssl
50private-tmp 50private-tmp
51 51
52restrict-namespaces 52restrict-namespaces
diff --git a/etc/profile-m-z/smuxi-frontend-gnome.profile b/etc/profile-m-z/smuxi-frontend-gnome.profile
index 566d72733..89342aad8 100644
--- a/etc/profile-m-z/smuxi-frontend-gnome.profile
+++ b/etc/profile-m-z/smuxi-frontend-gnome.profile
@@ -47,7 +47,7 @@ disable-mnt
47private-bin bash,mono,mono-sgen,sh,smuxi-frontend-gnome 47private-bin bash,mono,mono-sgen,sh,smuxi-frontend-gnome
48private-cache 48private-cache
49private-dev 49private-dev
50private-etc @tls-ca,@x11,mono,selinux 50private-etc @tls-ca,@x11,mono
51private-tmp 51private-tmp
52 52
53dbus-user none 53dbus-user none
diff --git a/etc/profile-m-z/spectral.profile b/etc/profile-m-z/spectral.profile
index 492a5bbeb..41b1f6507 100644
--- a/etc/profile-m-z/spectral.profile
+++ b/etc/profile-m-z/spectral.profile
@@ -45,7 +45,7 @@ disable-mnt
45private-cache 45private-cache
46private-bin spectral 46private-bin spectral
47private-dev 47private-dev
48private-etc @tls-ca,@x11,host.conf,mime.types,selinux 48private-etc @tls-ca,@x11,host.conf,mime.types
49private-tmp 49private-tmp
50 50
51dbus-user filter 51dbus-user filter
diff --git a/etc/profile-m-z/terasology.profile b/etc/profile-m-z/terasology.profile
index 27e0cc7d1..ced3aaa8a 100644
--- a/etc/profile-m-z/terasology.profile
+++ b/etc/profile-m-z/terasology.profile
@@ -40,7 +40,7 @@ seccomp
40 40
41disable-mnt 41disable-mnt
42private-dev 42private-dev
43private-etc @tls-ca,@x11,dbus-1,host.conf,java-7-openjdk,java-8-openjdk,lsb-release,mime.types 43private-etc @tls-ca,@x11,dbus-1,host.conf,java*,lsb-release,mime.types
44private-tmp 44private-tmp
45 45
46dbus-user none 46dbus-user none
diff --git a/etc/profile-m-z/trojita.profile b/etc/profile-m-z/trojita.profile
index 8acc6f763..378c8a1b7 100644
--- a/etc/profile-m-z/trojita.profile
+++ b/etc/profile-m-z/trojita.profile
@@ -53,7 +53,7 @@ tracelog
53private-bin trojita 53private-bin trojita
54private-cache 54private-cache
55private-dev 55private-dev
56private-etc @tls-ca,@x11,selinux 56private-etc @tls-ca,@x11
57private-tmp 57private-tmp
58 58
59dbus-user filter 59dbus-user filter
diff --git a/etc/profile-m-z/twitch.profile b/etc/profile-m-z/twitch.profile
index 1e759a760..1f548a92d 100644
--- a/etc/profile-m-z/twitch.profile
+++ b/etc/profile-m-z/twitch.profile
@@ -18,7 +18,7 @@ mkdir ${HOME}/.config/Twitch
18whitelist ${HOME}/.config/Twitch 18whitelist ${HOME}/.config/Twitch
19 19
20private-bin electron,electron[0-9],electron[0-9][0-9],twitch 20private-bin electron,electron[0-9],electron[0-9][0-9],twitch
21private-etc @tls-ca,@x11,bumblebee,host.conf,mime.types,selinux 21private-etc @tls-ca,@x11,bumblebee,host.conf,mime.types
22private-opt Twitch 22private-opt Twitch
23 23
24# Redirect 24# Redirect
diff --git a/etc/profile-m-z/youtube.profile b/etc/profile-m-z/youtube.profile
index 5049b740e..9bb1991c2 100644
--- a/etc/profile-m-z/youtube.profile
+++ b/etc/profile-m-z/youtube.profile
@@ -17,7 +17,7 @@ mkdir ${HOME}/.config/Youtube
17whitelist ${HOME}/.config/Youtube 17whitelist ${HOME}/.config/Youtube
18 18
19private-bin electron,electron[0-9],electron[0-9][0-9],youtube 19private-bin electron,electron[0-9],electron[0-9][0-9],youtube
20private-etc @tls-ca,@x11,bumblebee,host.conf,mime.types,selinux 20private-etc @tls-ca,@x11,bumblebee,host.conf,mime.types
21private-opt Youtube 21private-opt Youtube
22 22
23# Redirect 23# Redirect
diff --git a/etc/profile-m-z/youtubemusic-nativefier.profile b/etc/profile-m-z/youtubemusic-nativefier.profile
index 570399557..09a8a446f 100644
--- a/etc/profile-m-z/youtubemusic-nativefier.profile
+++ b/etc/profile-m-z/youtubemusic-nativefier.profile
@@ -14,7 +14,7 @@ mkdir ${HOME}/.config/youtubemusic-nativefier-040164
14whitelist ${HOME}/.config/youtubemusic-nativefier-040164 14whitelist ${HOME}/.config/youtubemusic-nativefier-040164
15 15
16private-bin electron,electron[0-9],electron[0-9][0-9],youtubemusic-nativefier 16private-bin electron,electron[0-9],electron[0-9][0-9],youtubemusic-nativefier
17private-etc @tls-ca,@x11,bumblebee,host.conf,mime.types,selinux 17private-etc @tls-ca,@x11,bumblebee,host.conf,mime.types
18private-opt youtubemusic-nativefier 18private-opt youtubemusic-nativefier
19 19
20# Redirect 20# Redirect
diff --git a/etc/profile-m-z/ytmdesktop.profile b/etc/profile-m-z/ytmdesktop.profile
index f74887185..43b624705 100644
--- a/etc/profile-m-z/ytmdesktop.profile
+++ b/etc/profile-m-z/ytmdesktop.profile
@@ -14,7 +14,7 @@ mkdir ${HOME}/.config/youtube-music-desktop-app
14whitelist ${HOME}/.config/youtube-music-desktop-app 14whitelist ${HOME}/.config/youtube-music-desktop-app
15 15
16# private-bin env,ytmdesktop 16# private-bin env,ytmdesktop
17private-etc @tls-ca,@x11,bumblebee,host.conf,mime.types,selinux 17private-etc @tls-ca,@x11,bumblebee,host.conf,mime.types
18# private-opt 18# private-opt
19 19
20# Redirect 20# Redirect
diff --git a/etc/profile-m-z/zeal.profile b/etc/profile-m-z/zeal.profile
index 7505fb575..caf9eab63 100644
--- a/etc/profile-m-z/zeal.profile
+++ b/etc/profile-m-z/zeal.profile
@@ -60,7 +60,7 @@ disable-mnt
60private-bin zeal 60private-bin zeal
61private-cache 61private-cache
62private-dev 62private-dev
63private-etc @tls-ca,@x11,host.conf,mime.types,rpc,services,Trolltech.conf 63private-etc @tls-ca,@x11,host.conf,mime.types,rpc,services
64private-tmp 64private-tmp
65 65
66dbus-user filter 66dbus-user filter
diff --git a/src/include/etc_groups.h b/src/include/etc_groups.h
index e3f8bcc7e..fffc5f9b9 100644
--- a/src/include/etc_groups.h
+++ b/src/include/etc_groups.h
@@ -39,6 +39,7 @@ static char *etc_list[ETC_MAX + 1] = { // plus 1 for ending NULL pointer
39 "login.defs", // firejail reading UID/GID MIN and MAX at startup 39 "login.defs", // firejail reading UID/GID MIN and MAX at startup
40 "nsswitch.conf", 40 "nsswitch.conf",
41 "passwd", 41 "passwd",
42 "selinux",
42 NULL 43 NULL
43}; 44};
44 45
@@ -89,6 +90,7 @@ static char *etc_group_x11[] = {
89 "kde5rc", 90 "kde5rc",
90 "nvidia", // 3D 91 "nvidia", // 3D
91 "pango", // text rendering/internationalization 92 "pango", // text rendering/internationalization
93 "Trolltech.conf", // old QT config file
92 "X11", 94 "X11",
93 "xdg", 95 "xdg",
94 NULL 96 NULL
diff --git a/src/tools/cleanup_etc.c b/src/tools/cleanup_etc.c
index 3b368b116..f57a1ddb1 100644
--- a/src/tools/cleanup_etc.c
+++ b/src/tools/cleanup_etc.c
@@ -38,6 +38,8 @@ static int arr_x11 = 0;
38static int arr_games = 0; 38static int arr_games = 0;
39static char outbuf[256 * 1024]; 39static char outbuf[256 * 1024];
40static char *outptr; 40static char *outptr;
41static int arg_replace = 0;
42static int arg_debug = 0;
41 43
42void outprintf(char* fmt, ...) { 44void outprintf(char* fmt, ...) {
43 va_list args; 45 va_list args;
@@ -78,6 +80,17 @@ static void arr_add(const char *fname) {
78 arr_cnt++; 80 arr_cnt++;
79} 81}
80 82
83int arr_cmp(const void *p1, const void *p2) {
84 char **ptr1 = (char **) p1;
85 char **ptr2 = (char **) p2;
86
87 return strcmp(*ptr1, *ptr2);
88}
89
90static void arr_sort(void) {
91 qsort(&arr[0], arr_cnt, sizeof(char *), arr_cmp);
92}
93
81static void arr_clean(void) { 94static void arr_clean(void) {
82 int i; 95 int i;
83 for (i = 0; i < arr_cnt; i++) { 96 for (i = 0; i < arr_cnt; i++) {
@@ -119,7 +132,7 @@ static void process_file(const char *fname) {
119 132
120 FILE *fp = fopen(fname, "r"); 133 FILE *fp = fopen(fname, "r");
121 if (!fp) { 134 if (!fp) {
122 fprintf(stderr, "Error: cannot open profile file\n"); 135 fprintf(stderr, "Error: cannot open %s file\n", fname);
123 exit(1); 136 exit(1);
124 } 137 }
125 138
@@ -133,10 +146,11 @@ static void process_file(const char *fname) {
133 int print = 0; 146 int print = 0;
134 while (fgets(line, MAX_BUF, fp)) { 147 while (fgets(line, MAX_BUF, fp)) {
135 cnt++; 148 cnt++;
136 if (strncmp(line, "private-etc ", 12) != 0) { 149 if (strncmp(line, "private-etc", 11) != 0) {
137 outprintf("%s", line); 150 outprintf("%s", line);
138 continue; 151 continue;
139 } 152 }
153
140 strcpy(orig_line,line); 154 strcpy(orig_line,line);
141 char *ptr = strchr(line, '\n'); 155 char *ptr = strchr(line, '\n');
142 if (ptr) 156 if (ptr)
@@ -158,6 +172,8 @@ static void process_file(const char *fname) {
158 172
159 ptr = strtok(ptr, ","); 173 ptr = strtok(ptr, ",");
160 while (ptr) { 174 while (ptr) {
175 if (arg_debug)
176 printf("%s\n", ptr);
161 if (arr_check(ptr, &etc_list[0])); 177 if (arr_check(ptr, &etc_list[0]));
162 else if (arr_check(ptr, &etc_group_sound[0])); 178 else if (arr_check(ptr, &etc_group_sound[0]));
163 else if (arr_check(ptr, &etc_group_network[0])); 179 else if (arr_check(ptr, &etc_group_network[0]));
@@ -179,34 +195,36 @@ static void process_file(const char *fname) {
179 ptr = strtok(NULL, ","); 195 ptr = strtok(NULL, ",");
180 } 196 }
181 197
198 arr_sort();
182 char *last_line = arr_print(); 199 char *last_line = arr_print();
183 if (strcmp(last_line, orig_line) == 0) { 200 if (strcmp(last_line, orig_line) == 0) {
184 fclose(fp); 201 fclose(fp);
185 return; 202 return;
186 } 203 }
187 printf("\n********************\n%s\n\n%s\n%s\n", fname, orig_line, last_line); 204 printf("\n********************\nfile: %s\n\nold: %s\nnew: %s\n", fname, orig_line, last_line);
188 print = 1; 205 print = 1;
189 } 206 }
190 207
191 fclose(fp); 208 fclose(fp);
192 209
193 if (print) { 210 if (print && arg_replace) {
194// printf("Replace? (Y/N): ", fname); 211 fp = fopen(fname, "w");
195// fgets(line, MAX_BUF, stdin); 212 if (!fp) {
196// if (*line == 'y' || *line == 'Y') { 213 fprintf(stderr, "Error: cannot open profile file\n");
197 fp = fopen(fname, "w"); 214 exit(1);
198 if (!fp) { 215 }
199 fprintf(stderr, "Error: cannot open profile file\n"); 216 fprintf(fp, "%s", outbuf);
200 exit(1); 217 fclose(fp);
201 }
202 fprintf(fp, "%s", outbuf);
203 fclose(fp);
204// }
205 } 218 }
206} 219}
207 220
208static void usage(void) { 221static void usage(void) {
209 printf("usage: cleanup-etc file.profile\n"); 222 printf("usage: cleanup-etc [options] file.profile [file.profile]\n");
223 printf("Group and clean private-etc entries in one or more profile files.\n");
224 printf("Options:\n");
225 printf(" --debug - print debug messages\n");
226 printf(" --help - this help screen\n");
227 printf(" --replace - replace profile file\n");
210} 228}
211 229
212int main(int argc, char **argv) { 230int main(int argc, char **argv) {
@@ -218,13 +236,25 @@ int main(int argc, char **argv) {
218 236
219 int i; 237 int i;
220 for (i = 1; i < argc; i++) { 238 for (i = 1; i < argc; i++) {
221 if (strcmp(argv[i], "-h") == 0) { 239 if (strcmp(argv[i], "-h") == 0 ||
240 strcmp(argv[i], "-?") == 0 ||
241 strcmp(argv[i], "--help") == 0) {
222 usage(); 242 usage();
223 return 0; 243 return 0;
224 } 244 }
245 else if (strcmp(argv[i], "--debug") == 0)
246 arg_debug = 1;
247 else if (strcmp(argv[i], "--replace") == 0)
248 arg_replace = 1;
249 else if (*argv[i] == '-') {
250 fprintf(stderr, "Error: invalid program option %s\n", argv[i]);
251 return 1;
252 }
253 else
254 break;
225 } 255 }
226 256
227 for (i = 1; i < argc; i++) 257 for (; i < argc; i++)
228 process_file(argv[i]); 258 process_file(argv[i]);
229 259
230 return 0; 260 return 0;