summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README3
-rw-r--r--README.md50
-rw-r--r--RELNOTES5
-rw-r--r--etc/akonadi_control.profile45
-rw-r--r--etc/blender-2.8.profile6
-rw-r--r--etc/disable-common.inc1
-rw-r--r--etc/disable-programs.inc11
-rw-r--r--etc/evince-previewer.profile10
-rw-r--r--etc/evince-thumbnailer.profile10
-rw-r--r--etc/gnome-recipes.profile45
-rw-r--r--etc/kate.profile3
-rw-r--r--etc/kmail.profile23
-rw-r--r--etc/knotes.profile10
-rw-r--r--etc/kwrite.profile3
-rw-r--r--etc/openbox.profile3
-rw-r--r--etc/spotify.profile2
-rw-r--r--etc/thunderbird-beta.profile8
-rw-r--r--src/firecfg/firecfg.config6
-rw-r--r--src/firejail/run_files.c30
-rw-r--r--src/lib/pid.c10
20 files changed, 273 insertions, 11 deletions
diff --git a/README b/README
index 6aacf8131..ff0500504 100644
--- a/README
+++ b/README
@@ -244,6 +244,9 @@ Gaman Gabriel (https://github.com/stelariusinfinitek)
244 - inox profile 244 - inox profile
245geg2048 (https://github.com/geg2048) 245geg2048 (https://github.com/geg2048)
246 - kwallet profile fixes 246 - kwallet profile fixes
247glitsj16 (https://github.com/glitsj16)
248 - evince-previewer, evince-thumbnailer profiles
249 - gnome-recipes profile
247graywolf (https://github.com/graywolf) 250graywolf (https://github.com/graywolf)
248 - spelling fix 251 - spelling fix
249greigdp (https://github.com/greigdp) 252greigdp (https://github.com/greigdp)
diff --git a/README.md b/README.md
index 90e3f7fcc..0c466a5e5 100644
--- a/README.md
+++ b/README.md
@@ -98,6 +98,52 @@ Use this issue to request new profiles: [#1139](https://github.com/netblue30/fir
98````` 98`````
99# Current development version: 0.9.53 99# Current development version: 0.9.53
100 100
101## Spectre mitigation
102
103If your gcc compiler version supports it, -mindirect-branch=thunk is inserted into EXTRA_CFLAGS during software configuration.
104The patch was introduced in gcc version 8, and it was backported to gcc 7. You'll also find it
105on older versions, for example on Debian stable running on gcc 6.3.0. This is how you check it:
106`````
107$ ./configure --prefix=/usr
108checking for gcc... gcc
109checking whether the C compiler works... yes
110checking for C compiler default output file name... a.out
111checking for suffix of executables...
112checking whether we are cross compiling... no
113checking for suffix of object files... o
114checking whether we are using the GNU C compiler... yes
115checking whether gcc accepts -g... yes
116checking for gcc option to accept ISO C89... none needed
117checking for a BSD-compatible install... /usr/bin/install -c
118checking for ranlib... ranlib
119checking for Spectre mitigation support in gcc compiler... yes
120[...]
121Configuration options:
122 prefix: /usr
123 sysconfdir: /etc
124 seccomp: -DHAVE_SECCOMP
125 <linux/seccomp.h>: -DHAVE_SECCOMP_H
126 apparmor:
127 global config: -DHAVE_GLOBALCFG
128 chroot: -DHAVE_CHROOT
129 bind: -DHAVE_BIND
130 network: -DHAVE_NETWORK
131 user namespace: -DHAVE_USERNS
132 X11 sandboxing support: -DHAVE_X11
133 whitelisting: -DHAVE_WHITELIST
134 private home support: -DHAVE_PRIVATE_HOME
135 file transfer support: -DHAVE_FILE_TRANSFER
136 overlayfs support: -DHAVE_OVERLAYFS
137 git install support:
138 busybox workaround: no
139 Spectre compiler patch: yes
140 EXTRA_LDFLAGS:
141 EXTRA_CFLAGS: -mindirect-branch=thunk
142 fatal warnings:
143 Gcov instrumentation:
144 Install contrib scripts: yes
145`````
146
101## AppImage development 147## AppImage development
102 148
103Support for private-bin, private-lib and shell none has been disabled while running AppImage archives. 149Support for private-bin, private-lib and shell none has been disabled while running AppImage archives.
@@ -246,4 +292,6 @@ firefox-common-addons.inc in firefox-common.profile.
246 292
247Basilisk browser, Tor Browser language packs, PlayOnLinux, sylpheed, discord-canary, 293Basilisk browser, Tor Browser language packs, PlayOnLinux, sylpheed, discord-canary,
248pycharm-community, pycharm-professional, Pitivi, OnionShare, Fritzing, Kaffeine, pdfchain, 294pycharm-community, pycharm-professional, Pitivi, OnionShare, Fritzing, Kaffeine, pdfchain,
249tilp, vivaldi-snapshot, bitcoin-qt, VS Code, falkon, gnome-builder, lobase, asunder 295tilp, vivaldi-snapshot, bitcoin-qt, VS Code, falkon, gnome-builder, lobase, asunder,
296gnome-recipes, akonadi_control, evince-previewer, evince-thumbnailer, blender-2.8,
297thunderbird-beta \ No newline at end of file
diff --git a/RELNOTES b/RELNOTES
index a031e697e..b299c5b9b 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -9,6 +9,7 @@ firejail (0.9.53) baseline; urgency=low
9 All users of Firefox-based browsers who use addons and plugins 9 All users of Firefox-based browsers who use addons and plugins
10 that read/write from ${HOME} will need to uncomment the includes for 10 that read/write from ${HOME} will need to uncomment the includes for
11 firefox-common-addons.inc in firefox-common.profile. 11 firefox-common-addons.inc in firefox-common.profile.
12 * Spectre mitigation patch for gcc compiler
12 * AppArmor support for overlayfs and chroot sandboxes 13 * AppArmor support for overlayfs and chroot sandboxes
13 * AppArmor support for AppImages 14 * AppArmor support for AppImages
14 * Enable AppArmor by default for Firefox, Chromium, Transmission 15 * Enable AppArmor by default for Firefox, Chromium, Transmission
@@ -27,7 +28,9 @@ firejail (0.9.53) baseline; urgency=low
27 * new profiles: basilisk, Tor Browser language packs, PlayOnLinux, sylpheed, 28 * new profiles: basilisk, Tor Browser language packs, PlayOnLinux, sylpheed,
28 * new profiles: discord-canary, pycharm-community, pycharm-professional, 29 * new profiles: discord-canary, pycharm-community, pycharm-professional,
29 * new profiles: pdfchain, tilp, vivaldi-snapshot, bitcoin-qt, kaffeine, 30 * new profiles: pdfchain, tilp, vivaldi-snapshot, bitcoin-qt, kaffeine,
30 * new profiles: falkon, gnome-builder, asunder, VS Code, 31 * new profiles: falkon, gnome-builder, asunder, VS Code, gnome-recipes
32 * new profiles: akonadi_controle, evince-previewer, evince-thumbnailer,
33 * new profiles: blender-2.8, thunderbird-beta
31 -- netblue30 <netblue30@yahoo.com> Thu, 1 Mar 2018 08:00:00 -0500 34 -- netblue30 <netblue30@yahoo.com> Thu, 1 Mar 2018 08:00:00 -0500
32 35
33firejail (0.9.52) baseline; urgency=low 36firejail (0.9.52) baseline; urgency=low
diff --git a/etc/akonadi_control.profile b/etc/akonadi_control.profile
new file mode 100644
index 000000000..0443774dd
--- /dev/null
+++ b/etc/akonadi_control.profile
@@ -0,0 +1,45 @@
1# Firejail profile for akonadi_control
2# Persistent local customizations
3include /etc/firejail/akonadi_control.local
4# Persistent global definitions
5include /etc/firejail/globals.local
6
7noblacklist ${HOME}/.cache/akonadi*
8noblacklist ${HOME}/.config/akonadi*
9noblacklist ${HOME}/.config/baloorc
10noblacklist ${HOME}/.local/share/akonadi/*
11noblacklist ${HOME}/.local/share/contacts
12noblacklist ${HOME}/.local/share/local-mail
13noblacklist /usr/sbin
14
15include /etc/firejail/disable-common.inc
16include /etc/firejail/disable-devel.inc
17include /etc/firejail/disable-passwdmgr.inc
18include /etc/firejail/disable-programs.inc
19
20include /etc/firejail/whitelist-var-common.inc
21
22# depending on your setup it might be possible to
23# enable some of the commented options below
24
25# apparmor
26caps.drop all
27ipc-namespace
28no3d
29netfilter
30nodvd
31nogroups
32# nonewprivs
33# noroot
34nosound
35notv
36novideo
37# protocol unix,inet,inet6
38# seccomp.drop @cpu-emulation,@debug,@obsolete,@privileged,@resources,add_key,fanotify_init,io_cancel,io_destroy,kcmp,keyctl,name_to_handle_at,ni_syscall,open_by_handle_at,personality,process_vm_readv,ptrace,remap_file_pages,request_key,syslog,umount,userfaultfd,vmsplice
39tracelog
40
41private-dev
42# private-tmp - breaks programs that depend on akonadi
43
44noexec ${HOME}
45noexec /tmp
diff --git a/etc/blender-2.8.profile b/etc/blender-2.8.profile
new file mode 100644
index 000000000..4b907018e
--- /dev/null
+++ b/etc/blender-2.8.profile
@@ -0,0 +1,6 @@
1# Firejail profile alias for blender
2# This file is overwritten after every install/update
3
4
5# Redirect
6include /etc/firejail/blender.profile
diff --git a/etc/disable-common.inc b/etc/disable-common.inc
index 19be56f86..e5de0b61f 100644
--- a/etc/disable-common.inc
+++ b/etc/disable-common.inc
@@ -75,6 +75,7 @@ blacklist ${HOME}/.kde4/share/config/plasma-desktop-appletsrc
75blacklist ${HOME}/.local/share/kglobalaccel 75blacklist ${HOME}/.local/share/kglobalaccel
76blacklist ${HOME}/.local/share/kwin 76blacklist ${HOME}/.local/share/kwin
77blacklist ${HOME}/.local/share/plasma 77blacklist ${HOME}/.local/share/plasma
78blacklist ${HOME}/.local/share/plasmashell
78blacklist ${HOME}/.local/share/solid 79blacklist ${HOME}/.local/share/solid
79read-only ${HOME}/.cache/ksycoca5_* 80read-only ${HOME}/.cache/ksycoca5_*
80read-only ${HOME}/.config/*notifyrc 81read-only ${HOME}/.config/*notifyrc
diff --git a/etc/disable-programs.inc b/etc/disable-programs.inc
index 0d542c6d8..de88cbc24 100644
--- a/etc/disable-programs.inc
+++ b/etc/disable-programs.inc
@@ -73,6 +73,7 @@ blacklist ${HOME}/.config/Slack
73blacklist ${HOME}/.config/Thunar 73blacklist ${HOME}/.config/Thunar
74blacklist ${HOME}/.config/VirtualBox 74blacklist ${HOME}/.config/VirtualBox
75blacklist ${HOME}/.config/Wire 75blacklist ${HOME}/.config/Wire
76blacklist ${HOME}/.config/akonadi*
76blacklist ${HOME}/.config/akregatorrc 77blacklist ${HOME}/.config/akregatorrc
77blacklist ${HOME}/.config/ardour4 78blacklist ${HOME}/.config/ardour4
78blacklist ${HOME}/.config/ardour5 79blacklist ${HOME}/.config/ardour5
@@ -106,6 +107,7 @@ blacklist ${HOME}/.config/digikam
106blacklist ${HOME}/.config/digikamrc 107blacklist ${HOME}/.config/digikamrc
107blacklist ${HOME}/.config/dolphinrc 108blacklist ${HOME}/.config/dolphinrc
108blacklist ${HOME}/.config/dragonplayerrc 109blacklist ${HOME}/.config/dragonplayerrc
110blacklist ${HOME}/.config/emailidentities
109blacklist ${HOME}/.config/enchant 111blacklist ${HOME}/.config/enchant
110blacklist ${HOME}/.config/eog 112blacklist ${HOME}/.config/eog
111blacklist ${HOME}/.config/epiphany 113blacklist ${HOME}/.config/epiphany
@@ -144,6 +146,7 @@ blacklist ${HOME}/.config/katevirc
144blacklist ${HOME}/.config/kdenliverc 146blacklist ${HOME}/.config/kdenliverc
145blacklist ${HOME}/.config/kgetrc 147blacklist ${HOME}/.config/kgetrc
146blacklist ${HOME}/.config/klipperrc 148blacklist ${HOME}/.config/klipperrc
149blacklist ${HOME}/.config/kmail2rc
147blacklist ${HOME}/.config/kritarc 150blacklist ${HOME}/.config/kritarc
148blacklist ${HOME}/.config/kwriterc 151blacklist ${HOME}/.config/kwriterc
149blacklist ${HOME}/.config/kdeconnect 152blacklist ${HOME}/.config/kdeconnect
@@ -346,18 +349,21 @@ blacklist ${HOME}/.local/share/SuperHexagon
346blacklist ${HOME}/.local/share/TelegramDesktop 349blacklist ${HOME}/.local/share/TelegramDesktop
347blacklist ${HOME}/.local/share/Terraria 350blacklist ${HOME}/.local/share/Terraria
348blacklist ${HOME}/.local/share/TpLogger 351blacklist ${HOME}/.local/share/TpLogger
352blacklist ${HOME}/.local/share/akonadi/*
349blacklist ${HOME}/.local/share/akregator 353blacklist ${HOME}/.local/share/akregator
350blacklist ${HOME}/.local/share/aspyr-media 354blacklist ${HOME}/.local/share/aspyr-media
351blacklist ${HOME}/.local/share/baloo 355blacklist ${HOME}/.local/share/baloo
352blacklist ${HOME}/.local/share/caja-python 356blacklist ${HOME}/.local/share/caja-python
353blacklist ${HOME}/.local/share/cdprojektred 357blacklist ${HOME}/.local/share/cdprojektred
354blacklist ${HOME}/.local/share/clipit 358blacklist ${HOME}/.local/share/clipit
359blacklist ${HOME}/.local/share/contacts
355blacklist ${HOME}/.local/share/data/Mumble 360blacklist ${HOME}/.local/share/data/Mumble
356blacklist ${HOME}/.local/share/data/MusE 361blacklist ${HOME}/.local/share/data/MusE
357blacklist ${HOME}/.local/share/data/MuseScore 362blacklist ${HOME}/.local/share/data/MuseScore
358blacklist ${HOME}/.local/share/data/qBittorrent 363blacklist ${HOME}/.local/share/data/qBittorrent
359blacklist ${HOME}/.local/share/dino 364blacklist ${HOME}/.local/share/dino
360blacklist ${HOME}/.local/share/dolphin 365blacklist ${HOME}/.local/share/dolphin
366blacklist ${HOME}/.local/share/emailidentities
361blacklist ${HOME}/.local/share/epiphany 367blacklist ${HOME}/.local/share/epiphany
362blacklist ${HOME}/.local/share/evolution 368blacklist ${HOME}/.local/share/evolution
363blacklist ${HOME}/.local/share/feral-interactive 369blacklist ${HOME}/.local/share/feral-interactive
@@ -369,6 +375,7 @@ blacklist ${HOME}/.local/share/gnome-2048
369blacklist ${HOME}/.local/share/gnome-chess 375blacklist ${HOME}/.local/share/gnome-chess
370blacklist ${HOME}/.local/share/gnome-music 376blacklist ${HOME}/.local/share/gnome-music
371blacklist ${HOME}/.local/share/gnome-photos 377blacklist ${HOME}/.local/share/gnome-photos
378blacklist ${HOME}/.local/share/gnome-recipes
372blacklist ${HOME}/.local/share/gnome-ring 379blacklist ${HOME}/.local/share/gnome-ring
373blacklist ${HOME}/.local/share/gnome-twitch 380blacklist ${HOME}/.local/share/gnome-twitch
374blacklist ${HOME}/.local/share/gwenview 381blacklist ${HOME}/.local/share/gwenview
@@ -376,11 +383,13 @@ blacklist ${HOME}/.local/share/kaffeine
376blacklist ${HOME}/.local/share/kate 383blacklist ${HOME}/.local/share/kate
377blacklist ${HOME}/.local/share/kdenlive 384blacklist ${HOME}/.local/share/kdenlive
378blacklist ${HOME}/.local/share/kget 385blacklist ${HOME}/.local/share/kget
386blacklist ${HOME}/.local/share/kmail2
379blacklist ${HOME}/.local/share/krita 387blacklist ${HOME}/.local/share/krita
380blacklist ${HOME}/.local/share/ktorrentrc 388blacklist ${HOME}/.local/share/ktorrentrc
381blacklist ${HOME}/.local/share/ktorrent 389blacklist ${HOME}/.local/share/ktorrent
382blacklist ${HOME}/.local/share/kwrite 390blacklist ${HOME}/.local/share/kwrite
383blacklist ${HOME}/.local/share/liferea 391blacklist ${HOME}/.local/share/liferea
392blacklist ${HOME}/.local/share/local-mail
384blacklist ${HOME}/.local/share/lollypop 393blacklist ${HOME}/.local/share/lollypop
385blacklist ${HOME}/.local/share/maps-places.json 394blacklist ${HOME}/.local/share/maps-places.json
386blacklist ${HOME}/.local/share/meld 395blacklist ${HOME}/.local/share/meld
@@ -397,6 +406,7 @@ blacklist ${HOME}/.local/share/okular
397blacklist ${HOME}/.local/share/orage 406blacklist ${HOME}/.local/share/orage
398blacklist ${HOME}/.local/share/org.kde.gwenview 407blacklist ${HOME}/.local/share/org.kde.gwenview
399blacklist ${HOME}/.local/share/pix 408blacklist ${HOME}/.local/share/pix
409blacklist ${HOME}/.local/share/plasma_notes
400blacklist ${HOME}/.local/share/psi+ 410blacklist ${HOME}/.local/share/psi+
401blacklist ${HOME}/.local/share/qpdfview 411blacklist ${HOME}/.local/share/qpdfview
402blacklist ${HOME}/.local/share/qutebrowser 412blacklist ${HOME}/.local/share/qutebrowser
@@ -495,6 +505,7 @@ blacklist ${HOME}/.cache/Franz
495blacklist ${HOME}/.cache/INRIA 505blacklist ${HOME}/.cache/INRIA
496blacklist ${HOME}/.cache/MusicBrainz 506blacklist ${HOME}/.cache/MusicBrainz
497blacklist ${HOME}/.cache/QuiteRss 507blacklist ${HOME}/.cache/QuiteRss
508blacklist ${HOME}/.cache/akonadi*
498blacklist ${HOME}/.cache/attic 509blacklist ${HOME}/.cache/attic
499blacklist ${HOME}/.cache/borg 510blacklist ${HOME}/.cache/borg
500blacklist ${HOME}/.cache/calibre 511blacklist ${HOME}/.cache/calibre
diff --git a/etc/evince-previewer.profile b/etc/evince-previewer.profile
new file mode 100644
index 000000000..d5bc6db33
--- /dev/null
+++ b/etc/evince-previewer.profile
@@ -0,0 +1,10 @@
1# Firejail profile for evince-previewer
2# This file is overwritten after every install/update
3# Persistent local customizations
4include /etc/firejail/evince-previewer.local
5# Persistent global definitions
6include /etc/firejail/globals.local
7
8
9# Redirect
10include /etc/firejail/evince.profile
diff --git a/etc/evince-thumbnailer.profile b/etc/evince-thumbnailer.profile
new file mode 100644
index 000000000..abc21632d
--- /dev/null
+++ b/etc/evince-thumbnailer.profile
@@ -0,0 +1,10 @@
1# Firejail profile for evince-thumbnailer
2# This file is overwritten after every install/update
3# Persistent local customizations
4include /etc/firejail/evince-thumbnailer.local
5# Persistent global definitions
6include /etc/firejail/globals.local
7
8
9# Redirect
10include /etc/firejail/evince.profile
diff --git a/etc/gnome-recipes.profile b/etc/gnome-recipes.profile
new file mode 100644
index 000000000..2392440a6
--- /dev/null
+++ b/etc/gnome-recipes.profile
@@ -0,0 +1,45 @@
1# Firejail profile for gnome-recipes
2# This file is overwritten after every install/update
3# Persistent local customizations
4include /etc/firejail/gnome-recipes.local
5# Persistent global definitions
6include /etc/firejail/globals.local
7
8
9noblacklist ${HOME}/.local/share/gnome-recipes
10
11include /etc/firejail/disable-common.inc
12include /etc/firejail/disable-devel.inc
13include /etc/firejail/disable-passwdmgr.inc
14include /etc/firejail/disable-programs.inc
15
16mkdir ${HOME}/.cache/gnome-recipes
17whitelist ${HOME}/.cache/gnome-recipes
18include /etc/firejail/whitelist-common.inc
19include /etc/firejail/whitelist-var-common.inc
20
21caps.drop all
22ipc-namespace
23netfilter
24nodvd
25nogroups
26nonewprivs
27noroot
28nosound
29notv
30novideo
31protocol unix,inet,inet6
32seccomp
33shell none
34
35disable-mnt
36private-bin gnome-recipes,tar
37private-dev
38private-etc ca-certificates,fonts,ssl
39# private-lib works for me with Gnome Shell 3.26.2, Mutter WM (Arch Linux)
40# not widely tested though, leaving it to devs discretion to enable it later
41#private-lib gdk-pixbuf-2.0,gio,gvfs/libgvfscommon.so,libgconf-2.so.4,libgnutls.so.30,libjpeg.so.8,libp11-kit.so.0,libproxy.so.1,librsvg-2.so.2
42private-tmp
43
44noexec ${HOME}
45noexec /tmp
diff --git a/etc/kate.profile b/etc/kate.profile
index a3d2be6b2..5042077e5 100644
--- a/etc/kate.profile
+++ b/etc/kate.profile
@@ -42,4 +42,7 @@ private-dev
42# private-etc fonts,kde4rc,kde5rc,ld.so.cache,machine-id,xdg 42# private-etc fonts,kde4rc,kde5rc,ld.so.cache,machine-id,xdg
43private-tmp 43private-tmp
44 44
45# noexec ${HOME}
46noexec /tmp
47
45join-or-start kate 48join-or-start kate
diff --git a/etc/kmail.profile b/etc/kmail.profile
index ca774f4ec..952af55c8 100644
--- a/etc/kmail.profile
+++ b/etc/kmail.profile
@@ -5,6 +5,19 @@ include /etc/firejail/kmail.local
5# Persistent global definitions 5# Persistent global definitions
6include /etc/firejail/globals.local 6include /etc/firejail/globals.local
7 7
8# if akonadi has a mysql backend, starting it inside this sandbox will fail.
9# one solution is to have akonadi already running when kmail is launched
10
11noblacklist ${HOME}/.cache/akonadi*
12noblacklist ${HOME}/.config/akonadi*
13noblacklist ${HOME}/.config/baloorc
14noblacklist ${HOME}/.config/emailidentities
15noblacklist ${HOME}/.config/kmail2rc
16noblacklist ${HOME}/.local/share/akonadi/*
17noblacklist ${HOME}/.local/share/contacts
18noblacklist ${HOME}/.local/share/emailidentities
19noblacklist ${HOME}/.local/share/kmail2
20noblacklist ${HOME}/.local/share/local-mail
8noblacklist ${HOME}/.gnupg 21noblacklist ${HOME}/.gnupg
9 22
10include /etc/firejail/disable-common.inc 23include /etc/firejail/disable-common.inc
@@ -12,6 +25,7 @@ include /etc/firejail/disable-devel.inc
12include /etc/firejail/disable-passwdmgr.inc 25include /etc/firejail/disable-passwdmgr.inc
13include /etc/firejail/disable-programs.inc 26include /etc/firejail/disable-programs.inc
14 27
28# apparmor
15caps.drop all 29caps.drop all
16netfilter 30netfilter
17nodvd 31nodvd
@@ -22,11 +36,14 @@ nosound
22notv 36notv
23novideo 37novideo
24protocol unix,inet,inet6,netlink 38protocol unix,inet,inet6,netlink
25# blacklisting of chroot system calls breaks kmail 39# we need to allow chroot and ioprio_set system calls
26seccomp.drop @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice 40seccomp.drop @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice
27# tracelog 41# tracelog
28# writable-run-user is needed for signing and encrypting emails 42# writable-run-user is needed for signing and encrypting emails
29writable-run-user 43writable-run-user
30 44
31private-dev 45private-dev
32# private-tmp - breaks akonadi and opening of email attachments 46# private-tmp - interrupts connection to akonadi, breaks opening of email attachments
47
48noexec ${HOME}
49noexec /tmp
diff --git a/etc/knotes.profile b/etc/knotes.profile
index 94ada7855..091c3a8e5 100644
--- a/etc/knotes.profile
+++ b/etc/knotes.profile
@@ -5,10 +5,12 @@ include /etc/firejail/knotes.local
5# Persistent global definitions 5# Persistent global definitions
6include /etc/firejail/globals.local 6include /etc/firejail/globals.local
7 7
8noblacklist ${HOME}/.config/akonadi*
8noblacklist ${HOME}/.config/knotesrc 9noblacklist ${HOME}/.config/knotesrc
10noblacklist ${HOME}/.local/share/akonadi/*
9 11
10include /etc/firejail/disable-common.inc 12include /etc/firejail/disable-common.inc
11# include /etc/firejail/disable-devel.inc 13include /etc/firejail/disable-devel.inc
12include /etc/firejail/disable-passwdmgr.inc 14include /etc/firejail/disable-passwdmgr.inc
13include /etc/firejail/disable-programs.inc 15include /etc/firejail/disable-programs.inc
14 16
@@ -22,10 +24,14 @@ nonewprivs
22noroot 24noroot
23nosound 25nosound
24notv 26notv
27novideo
25protocol unix 28protocol unix
26seccomp 29seccomp
27shell none 30shell none
28tracelog 31tracelog
29 32
30private-dev 33private-dev
31#private-tmp - problems on kubuntu 17.04 34# private-tmp - interrupts connection to akonadi
35
36noexec ${HOME}
37noexec /tmp
diff --git a/etc/kwrite.profile b/etc/kwrite.profile
index a785f3541..1c4e50b77 100644
--- a/etc/kwrite.profile
+++ b/etc/kwrite.profile
@@ -43,4 +43,7 @@ private-dev
43private-etc fonts,kde4rc,kde5rc,ld.so.cache,machine-id,pulse,xdg 43private-etc fonts,kde4rc,kde5rc,ld.so.cache,machine-id,pulse,xdg
44private-tmp 44private-tmp
45 45
46noexec ${HOME}
47noexec /tmp
48
46join-or-start kwrite 49join-or-start kwrite
diff --git a/etc/openbox.profile b/etc/openbox.profile
index 5bab7ce7d..ec4b47c29 100644
--- a/etc/openbox.profile
+++ b/etc/openbox.profile
@@ -14,3 +14,6 @@ netfilter
14noroot 14noroot
15protocol unix,inet,inet6 15protocol unix,inet,inet6
16seccomp 16seccomp
17
18read-only ${HOME}/.config/openbox/autostart
19read-only ${HOME}/.config/openbox/environment
diff --git a/etc/spotify.profile b/etc/spotify.profile
index c973783a9..5a6227a8a 100644
--- a/etc/spotify.profile
+++ b/etc/spotify.profile
@@ -44,7 +44,7 @@ tracelog
44disable-mnt 44disable-mnt
45private-bin spotify,bash,sh,zenity 45private-bin spotify,bash,sh,zenity
46private-dev 46private-dev
47private-etc fonts,group,ld.so.cache,machine-id,pulse,resolv.conf 47private-etc fonts,ld.so.cache,machine-id,pulse,resolv.conf
48private-opt spotify 48private-opt spotify
49private-tmp 49private-tmp
50 50
diff --git a/etc/thunderbird-beta.profile b/etc/thunderbird-beta.profile
new file mode 100644
index 000000000..73d2419da
--- /dev/null
+++ b/etc/thunderbird-beta.profile
@@ -0,0 +1,8 @@
1# Firejail profile alias for thunderbird-beta
2# This file is overwritten after every install/update
3
4
5whitelist /opt/thunderbird-beta
6
7# Redirect
8include /etc/firejail/thunderbird.profile
diff --git a/src/firecfg/firecfg.config b/src/firecfg/firecfg.config
index e29f95886..f2409d67b 100644
--- a/src/firecfg/firecfg.config
+++ b/src/firecfg/firecfg.config
@@ -16,6 +16,7 @@ VirtualBox
16Wire 16Wire
17Xephyr 17Xephyr
18abrowser 18abrowser
19akonadi_control
19akregator 20akregator
20amarok 21amarok
21amule 22amule
@@ -43,6 +44,7 @@ bibletime
43bitlbee 44bitlbee
44bleachbit 45bleachbit
45blender 46blender
47blender-2.8
46bless 48bless
47bluefish 49bluefish
48bnox 50bnox
@@ -108,6 +110,8 @@ eom
108epiphany 110epiphany
109etr 111etr
110evince 112evince
113evince-previewer
114evince-thumbnailer
111evolution 115evolution
112exiftool 116exiftool
113falkon 117falkon
@@ -154,6 +158,7 @@ gnome-maps
154gnome-mplayer 158gnome-mplayer
155gnome-music 159gnome-music
156gnome-photos 160gnome-photos
161gnome-recipes
157gnome-twitch 162gnome-twitch
158gnome-weather 163gnome-weather
159goobox 164goobox
@@ -348,6 +353,7 @@ telegram
348telegram-desktop 353telegram-desktop
349terasology 354terasology
350thunderbird 355thunderbird
356thunderbird-beta
351tilp 357tilp
352tor-browser-ar 358tor-browser-ar
353tor-browser-en 359tor-browser-en
diff --git a/src/firejail/run_files.c b/src/firejail/run_files.c
index 57a0e19df..361ad1414 100644
--- a/src/firejail/run_files.c
+++ b/src/firejail/run_files.c
@@ -20,6 +20,7 @@
20 20
21#include "firejail.h" 21#include "firejail.h"
22#include "../include/pid.h" 22#include "../include/pid.h"
23#define BUFLEN 4096
23 24
24static void delete_x11_run_file(pid_t pid) { 25static void delete_x11_run_file(pid_t pid) {
25 char *fname; 26 char *fname;
@@ -74,7 +75,36 @@ void delete_run_files(pid_t pid) {
74 delete_profile_run_file(pid); 75 delete_profile_run_file(pid);
75} 76}
76 77
78static char *newname(char *name) {
79 char *rv;
80 pid_t pid;
81
82 // try the name
83 if (name2pid(name, &pid))
84 return name;
85
86 // try name-1 to 9
87 int i;
88 for (i = 1; i < 10; i++) {
89 if (asprintf(&rv, "%s-%d", name, i) == -1)
90 errExit("asprintf");
91 if (name2pid(rv, &pid)) {
92 fwarning("Sandbox name changed to %s\n", rv);
93 return rv;
94 }
95 free(rv);
96 }
97
98 // return name-pid
99 if (asprintf(&rv, "%s-%d", name, getpid()) == -1)
100 errExit("asprintf");
101 return rv;
102}
103
104
77void set_name_run_file(pid_t pid) { 105void set_name_run_file(pid_t pid) {
106 cfg.name = newname(cfg.name);
107
78 char *fname; 108 char *fname;
79 if (asprintf(&fname, "%s/%d", RUN_FIREJAIL_NAME_DIR, pid) == -1) 109 if (asprintf(&fname, "%s/%d", RUN_FIREJAIL_NAME_DIR, pid) == -1)
80 errExit("asprintf"); 110 errExit("asprintf");
diff --git a/src/lib/pid.c b/src/lib/pid.c
index f138efc8c..3c804716d 100644
--- a/src/lib/pid.c
+++ b/src/lib/pid.c
@@ -188,10 +188,11 @@ static void print_elem(unsigned index, int nowrap) {
188 uid_t uid = pids[index].uid; 188 uid_t uid = pids[index].uid;
189 char *cmd = pid_proc_cmdline(index); 189 char *cmd = pid_proc_cmdline(index);
190 char *user = pid_get_user_name(uid); 190 char *user = pid_get_user_name(uid);
191 char *allocated = user; 191 char *user_allocated = user;
192 192
193 // extract sandbox name - pid == index 193 // extract sandbox name - pid == index
194 char *sandbox_name = ""; 194 char *sandbox_name = "";
195 char *sandbox_name_allocated = NULL;
195 char *fname; 196 char *fname;
196 if (asprintf(&fname, "%s/%d", RUN_FIREJAIL_NAME_DIR, index) == -1) 197 if (asprintf(&fname, "%s/%d", RUN_FIREJAIL_NAME_DIR, index) == -1)
197 errExit("asprintf"); 198 errExit("asprintf");
@@ -202,6 +203,7 @@ static void print_elem(unsigned index, int nowrap) {
202 sandbox_name = malloc(s.st_size + 1); 203 sandbox_name = malloc(s.st_size + 1);
203 if (!sandbox_name) 204 if (!sandbox_name)
204 errExit("malloc"); 205 errExit("malloc");
206 sandbox_name_allocated = sandbox_name;
205 char *rv = fgets(sandbox_name, s.st_size + 1, fp); 207 char *rv = fgets(sandbox_name, s.st_size + 1, fp);
206 if (!rv) 208 if (!rv)
207 *sandbox_name = '\0'; 209 *sandbox_name = '\0';
@@ -241,8 +243,10 @@ static void print_elem(unsigned index, int nowrap) {
241 else 243 else
242 printf("%s%u:\n", indent, index); 244 printf("%s%u:\n", indent, index);
243 } 245 }
244 if (allocated) 246 if (user_allocated)
245 free(allocated); 247 free(user_allocated);
248 if (sandbox_name_allocated)
249 free(sandbox_name_allocated);
246} 250}
247 251
248// recursivity!!! 252// recursivity!!!