aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.gitlab-ci.yml18
-rw-r--r--Makefile.in10
-rw-r--r--README2
-rw-r--r--RELNOTES2
-rwxr-xr-xconfigure8
-rw-r--r--configure.ac1
-rw-r--r--etc/apparmor/firejail-default2
-rw-r--r--etc/inc/disable-common.inc21
-rw-r--r--etc/inc/disable-programs.inc13
-rw-r--r--etc/profile-a-l/dino-im.profile14
-rw-r--r--etc/profile-a-l/google-chrome-beta.profile6
-rw-r--r--etc/profile-a-l/google-chrome-unstable.profile6
-rw-r--r--etc/profile-a-l/google-chrome.profile6
-rw-r--r--etc/profile-m-z/mocp.profile53
-rw-r--r--etc/profile-m-z/mpg123.profile10
-rw-r--r--etc/profile-m-z/plv.profile59
-rw-r--r--etc/profile-m-z/secret-tool.profile1
-rw-r--r--etc/profile-m-z/steam.profile10
-rw-r--r--etc/profile-m-z/wire-desktop.profile4
-rw-r--r--etc/profile-m-z/yelp.profile1
-rwxr-xr-xmkdeb.sh56
-rwxr-xr-xmkdeb.sh.in (renamed from mkdeb-apparmor.sh)24
-rw-r--r--platform/rpm/firejail.spec4
-rwxr-xr-xplatform/rpm/mkrpm.sh12
-rw-r--r--src/firecfg/firecfg.config3
-rw-r--r--src/firejail/fs.c7
-rwxr-xr-xtest/fs/mkdir_mkfile.exp14
-rwxr-xr-xtest/utils/build.exp56
-rwxr-xr-xtest/utils/utils.sh5
30 files changed, 299 insertions, 130 deletions
diff --git a/.gitignore b/.gitignore
index 39380446b..70ced1a99 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@ firejail-users.5
19firejail.1 19firejail.1
20firemon.1 20firemon.1
21firecfg.1 21firecfg.1
22mkdeb.sh
22src/firejail/firejail 23src/firejail/firejail
23src/firemon/firemon 24src/firemon/firemon
24src/firecfg/firecfg 25src/firecfg/firecfg
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2205c796c..204ebda95 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,7 @@ build_ubuntu_package:
9 image: ubuntu:rolling 9 image: ubuntu:rolling
10 script: 10 script:
11 - apt-get update -qq 11 - apt-get update -qq
12 - apt-get install -y -qq build-essential lintian pkg-config python3 12 - DEBIAN_FRONTEND=noninteractive apt-get install -y -qq build-essential lintian pkg-config python3
13 - ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb 13 - ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb
14 - python3 contrib/sort.py etc/profile-*/*.profile etc/inc/*.inc 14 - python3 contrib/sort.py etc/profile-*/*.profile etc/inc/*.inc
15 15
@@ -20,12 +20,12 @@ build_debian_package:
20 - apt-get install -y -qq build-essential lintian pkg-config 20 - apt-get install -y -qq build-essential lintian pkg-config
21 - ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb 21 - ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb
22 22
23#build_redhat_package: 23build_redhat_package:
24# image: centos:latest 24 image: centos:latest
25# script: 25 script:
26# - yum update -y 26 - dnf update -y
27# - yum install -y rpm-build gcc make 27 - dnf install -y rpm-build gcc make
28# - ./configure --prefix=/usr && make rpms && yum install -y firejail*.rpm 28 - ./configure --prefix=/usr && make rpms && rpm -i firejail*.rpm
29 29
30build_fedora_package: 30build_fedora_package:
31 image: fedora:latest 31 image: fedora:latest
@@ -48,8 +48,8 @@ build_apparmor:
48 image: ubuntu:latest 48 image: ubuntu:latest
49 script: 49 script:
50 - apt-get update -qq 50 - apt-get update -qq
51 - apt-get install -y -qq build-essential lintian libapparmor-dev pkg-config 51 - DEBIAN_FRONTEND=noninteractive apt-get install -y -qq build-essential lintian libapparmor-dev pkg-config
52 - ./configure --prefix=/usr && make deb-apparmor && dpkg -i firejail-apparmor*.deb 52 - ./configure --prefix=/usr && make deb-apparmor && dpkg -i firejail*.deb
53 53
54cppcheck: 54cppcheck:
55 image: debian:latest 55 image: debian:latest
diff --git a/Makefile.in b/Makefile.in
index 0da33544c..575c5d614 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -28,13 +28,13 @@ SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary secco
28endif 28endif
29ALL_ITEMS = $(APPS) $(SBOX_APPS) $(MYLIBS) 29ALL_ITEMS = $(APPS) $(SBOX_APPS) $(MYLIBS)
30 30
31.PHONY: all_items man filters 31.PHONY: all_items $(ALL_ITEMS)
32all_items: $(ALL_ITEMS) 32all_items: $(ALL_ITEMS)
33$(ALL_ITEMS): $(MYDIRS) 33$(ALL_ITEMS): $(MYDIRS)
34 $(MAKE) -C $(dir $@) 34 $(MAKE) -C $(dir $@)
35 35
36.PHONY: mydirs 36.PHONY: mydirs
37mydirs: $(MYDIRS) 37mydirs: mydirs $(MYDIRS)
38$(MYDIRS): 38$(MYDIRS):
39 $(MAKE) -C $@ 39 $(MAKE) -C $@
40 40
@@ -183,7 +183,7 @@ uninstall:
183 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg 183 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg
184 @echo "If you want to install a different version of firejail, you might also need to run 'rm -fr $(DESTDIR)/$(sysconfdir)/firejail', see #2038." 184 @echo "If you want to install a different version of firejail, you might also need to run 'rm -fr $(DESTDIR)/$(sysconfdir)/firejail', see #2038."
185 185
186DISTFILES = "src etc m4 platform contrib configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkdeb-apparmor.sh COPYING README RELNOTES" 186DISTFILES = "src etc m4 platform contrib configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh.in COPYING README RELNOTES"
187DISTFILES_TEST = "test/apps test/apps-x11 test/apps-x11-xorg test/root test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/arguments test/fs test/sysutils test/chroot" 187DISTFILES_TEST = "test/apps test/apps-x11 test/apps-x11-xorg test/root test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/arguments test/fs test/sysutils test/chroot"
188 188
189dist: 189dist:
@@ -202,10 +202,10 @@ dist:
202asc:; ./mkasc.sh $(VERSION) 202asc:; ./mkasc.sh $(VERSION)
203 203
204deb: dist 204deb: dist
205 ./mkdeb.sh $(NAME) $(VERSION) 205 ./mkdeb.sh
206 206
207deb-apparmor: dist 207deb-apparmor: dist
208 ./mkdeb-apparmor.sh $(NAME) $(VERSION) 208 ./mkdeb.sh -apparmor
209 209
210test-compile: dist 210test-compile: dist
211 cd test/compile; ./compile.sh $(NAME)-$(VERSION) 211 cd test/compile; ./compile.sh $(NAME)-$(VERSION)
diff --git a/README b/README
index 48683ed8a..d4b591cc1 100644
--- a/README
+++ b/README
@@ -511,6 +511,8 @@ Lukáš Krejčí (https://github.com/lskrejci)
511 - fixed parsing of --keep-var-tmp 511 - fixed parsing of --keep-var-tmp
512luzpaz (https://github.com/luzpaz) 512luzpaz (https://github.com/luzpaz)
513 - code spelling fixes 513 - code spelling fixes
514Mace Muilman (https://github.com/mace015)
515 - google-chrome{,beta,unstable} flags
514maces (https://github.com/maces) 516maces (https://github.com/maces)
515 - Franz messenger profile 517 - Franz messenger profile
516Madura A (https://github.com/manushanga) 518Madura A (https://github.com/manushanga)
diff --git a/RELNOTES b/RELNOTES
index 12ca15b48..9f97f8ab1 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -33,7 +33,7 @@ firejail (0.9.63) baseline; urgency=low
33 * new profiles: mirrormagic, mrrescue, scorched3d-wrapper, scorchwentbonkers 33 * new profiles: mirrormagic, mrrescue, scorched3d-wrapper, scorchwentbonkers
34 * new profiles: seahorse-adventures, wordwarvi, xbill, gnome-klotski 34 * new profiles: seahorse-adventures, wordwarvi, xbill, gnome-klotski
35 * new profiles: swell-foop, fdns, five-or-more, steam-runtime, jitsi-meet-desktop 35 * new profiles: swell-foop, fdns, five-or-more, steam-runtime, jitsi-meet-desktop
36 * new profiles: nicontine 36 * new profiles: nicotine, plv, mocp
37 -- netblue30 <netblue30@yahoo.com> Tue, 21 Apr 2020 08:00:00 -0500 37 -- netblue30 <netblue30@yahoo.com> Tue, 21 Apr 2020 08:00:00 -0500
38 38
39firejail (0.9.62) baseline; urgency=low 39firejail (0.9.62) baseline; urgency=low
diff --git a/configure b/configure
index f587bb25e..12881fcaf 100755
--- a/configure
+++ b/configure
@@ -4186,6 +4186,8 @@ if test "$prefix" = /usr; then
4186 test "$sysconfdir" = '${prefix}/etc' && sysconfdir="/etc" 4186 test "$sysconfdir" = '${prefix}/etc' && sysconfdir="/etc"
4187fi 4187fi
4188 4188
4189ac_config_files="$ac_config_files mkdeb.sh"
4190
4189ac_config_files="$ac_config_files Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile src/ftee/Makefile src/faudit/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile src/profstats/Makefile" 4191ac_config_files="$ac_config_files Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile src/ftee/Makefile src/faudit/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile src/profstats/Makefile"
4190 4192
4191cat >confcache <<\_ACEOF 4193cat >confcache <<\_ACEOF
@@ -4895,6 +4897,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4895for ac_config_target in $ac_config_targets 4897for ac_config_target in $ac_config_targets
4896do 4898do
4897 case $ac_config_target in 4899 case $ac_config_target in
4900 "mkdeb.sh") CONFIG_FILES="$CONFIG_FILES mkdeb.sh" ;;
4898 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 4901 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
4899 "src/common.mk") CONFIG_FILES="$CONFIG_FILES src/common.mk" ;; 4902 "src/common.mk") CONFIG_FILES="$CONFIG_FILES src/common.mk" ;;
4900 "src/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;; 4903 "src/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;;
@@ -5333,6 +5336,11 @@ which seems to be undefined. Please make sure it is defined" >&2;}
5333 5336
5334 esac 5337 esac
5335 5338
5339
5340 case $ac_file$ac_mode in
5341 "mkdeb.sh":F) chmod +x mkdeb.sh ;;
5342
5343 esac
5336done # for ac_tag 5344done # for ac_tag
5337 5345
5338 5346
diff --git a/configure.ac b/configure.ac
index 8cf170c80..feb0b38a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,6 +204,7 @@ if test "$prefix" = /usr; then
204 test "$sysconfdir" = '${prefix}/etc' && sysconfdir="/etc" 204 test "$sysconfdir" = '${prefix}/etc' && sysconfdir="/etc"
205fi 205fi
206 206
207AC_CONFIG_FILES([mkdeb.sh], [chmod +x mkdeb.sh])
207AC_OUTPUT(Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile \ 208AC_OUTPUT(Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile \
208src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile \ 209src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile \
209src/ftee/Makefile src/faudit/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile \ 210src/ftee/Makefile src/faudit/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile \
diff --git a/etc/apparmor/firejail-default b/etc/apparmor/firejail-default
index e68e51c63..fc6690752 100644
--- a/etc/apparmor/firejail-default
+++ b/etc/apparmor/firejail-default
@@ -19,6 +19,8 @@ profile firejail-default flags=(attach_disconnected,mediate_deleted) {
19#include <abstractions/dbus-strict> 19#include <abstractions/dbus-strict>
20#include <abstractions/dbus-session-strict> 20#include <abstractions/dbus-session-strict>
21dbus, 21dbus,
22# Add rule in order to avoid dbus-*=filter breakage (#3432)
23owner /{,var/}run/firejail/dbus/[0-9]*/[0-9]*-user w,
22 24
23########## 25##########
24# With ptrace it is possible to inspect and hijack running programs. 26# With ptrace it is possible to inspect and hijack running programs.
diff --git a/etc/inc/disable-common.inc b/etc/inc/disable-common.inc
index 3fd3cc7b2..ce3b24584 100644
--- a/etc/inc/disable-common.inc
+++ b/etc/inc/disable-common.inc
@@ -144,12 +144,16 @@ blacklist ${RUNUSER}/kdesud_*
144blacklist ${HOME}/.local/share/gnome-shell 144blacklist ${HOME}/.local/share/gnome-shell
145# no direct modification of dconf database 145# no direct modification of dconf database
146read-only ${HOME}/.config/dconf 146read-only ${HOME}/.config/dconf
147blacklist ${RUNUSER}/gnome-session-leader-fifo
148blacklist ${RUNUSER}/gnome-shell
149blacklist ${RUNUSER}/gsconnect
147 150
148# systemd 151# systemd
149blacklist ${HOME}/.config/systemd 152blacklist ${HOME}/.config/systemd
150blacklist ${HOME}/.local/share/systemd 153blacklist ${HOME}/.local/share/systemd
151blacklist /var/lib/systemd 154blacklist /var/lib/systemd
152blacklist ${PATH}/systemd-run 155blacklist ${PATH}/systemd-run
156blacklist ${RUNUSER}/systemd
153# creates problems on Arch where /etc/resolv.conf is a symlink to /var/run/systemd/resolve/resolv.conf 157# creates problems on Arch where /etc/resolv.conf is a symlink to /var/run/systemd/resolve/resolv.conf
154#blacklist /var/run/systemd 158#blacklist /var/run/systemd
155 159
@@ -175,6 +179,13 @@ blacklist /var/cache/libvirt
175blacklist /var/lib/libvirt 179blacklist /var/lib/libvirt
176blacklist /var/log/libvirt 180blacklist /var/log/libvirt
177 181
182# OCI-Containers / Podman
183blacklist ${RUNUSER}/containers
184blacklist ${RUNUSER}/crun
185blacklist ${RUNUSER}/libpod
186blacklist ${RUNUSER}/runc
187blacklist ${RUNUSER}/toolbox
188
178# VeraCrypt 189# VeraCrypt
179blacklist ${HOME}/.VeraCrypt 190blacklist ${HOME}/.VeraCrypt
180blacklist ${PATH}/veracrypt 191blacklist ${PATH}/veracrypt
@@ -389,6 +400,7 @@ blacklist /usr/sbin
389 400
390# system management 401# system management
391blacklist ${PATH}/at 402blacklist ${PATH}/at
403blacklist ${PATH}/busybox
392blacklist ${PATH}/chage 404blacklist ${PATH}/chage
393blacklist ${PATH}/chfn 405blacklist ${PATH}/chfn
394blacklist ${PATH}/chsh 406blacklist ${PATH}/chsh
@@ -477,6 +489,9 @@ blacklist /var/lib/flatpak
477# most of the time bwrap is SUID binary 489# most of the time bwrap is SUID binary
478blacklist ${PATH}/bwrap 490blacklist ${PATH}/bwrap
479 491
492# snap
493blacklist ${RUNUSER}/snapd-session-agent.socket
494
480# mail directories used by mutt 495# mail directories used by mutt
481blacklist ${HOME}/.Mail 496blacklist ${HOME}/.Mail
482blacklist ${HOME}/.mail 497blacklist ${HOME}/.mail
@@ -501,3 +516,9 @@ blacklist ${PATH}/dns2tcp
501blacklist ${PATH}/iodine 516blacklist ${PATH}/iodine
502blacklist ${PATH}/knsupdate 517blacklist ${PATH}/knsupdate
503blacklist ${PATH}/resolvectl 518blacklist ${PATH}/resolvectl
519
520# rest of ${RUNUSER}
521blacklist ${RUNUSER}/*.lock
522blacklist ${RUNUSER}/inaccessible
523blacklist ${RUNUSER}/update-notifier.pid
524blacklist ${RUNUSER}/pk-debconf-socket
diff --git a/etc/inc/disable-programs.inc b/etc/inc/disable-programs.inc
index 89189b533..89bfa540e 100644
--- a/etc/inc/disable-programs.inc
+++ b/etc/inc/disable-programs.inc
@@ -108,6 +108,7 @@ blacklist ${HOME}/.config/MuseScore
108blacklist ${HOME}/.config/MusicBrainz 108blacklist ${HOME}/.config/MusicBrainz
109blacklist ${HOME}/.config/Nathan Osman 109blacklist ${HOME}/.config/Nathan Osman
110blacklist ${HOME}/.config/Nylas Mail 110blacklist ${HOME}/.config/Nylas Mail
111blacklist ${HOME}/.config/PacmanLogViewer
111blacklist ${HOME}/.config/PBE 112blacklist ${HOME}/.config/PBE
112blacklist ${HOME}/.config/Philipp Schmieder 113blacklist ${HOME}/.config/Philipp Schmieder
113blacklist ${HOME}/.config/QGIS 114blacklist ${HOME}/.config/QGIS
@@ -160,6 +161,12 @@ blacklist ${HOME}/.config/cantata
160blacklist ${HOME}/.config/catfish 161blacklist ${HOME}/.config/catfish
161blacklist ${HOME}/.config/celluloid 162blacklist ${HOME}/.config/celluloid
162blacklist ${HOME}/.config/cherrytree 163blacklist ${HOME}/.config/cherrytree
164blacklist ${HOME}/.config/chrome-beta-flags.conf
165blacklist ${HOME}/.config/chrome-beta-flags.config
166blacklist ${HOME}/.config/chrome-flags.conf
167blacklist ${HOME}/.config/chrome-flags.config
168blacklist ${HOME}/.config/chrome-unstable-flags.conf
169blacklist ${HOME}/.config/chrome-unstable-flags.config
163blacklist ${HOME}/.config/chromium 170blacklist ${HOME}/.config/chromium
164blacklist ${HOME}/.config/chromium-dev 171blacklist ${HOME}/.config/chromium-dev
165blacklist ${HOME}/.config/chromium-flags.conf 172blacklist ${HOME}/.config/chromium-flags.conf
@@ -553,6 +560,7 @@ blacklist ${HOME}/.local/share/dolphin
553blacklist ${HOME}/.local/share/emailidentities 560blacklist ${HOME}/.local/share/emailidentities
554blacklist ${HOME}/.local/share/epiphany 561blacklist ${HOME}/.local/share/epiphany
555blacklist ${HOME}/.local/share/evolution 562blacklist ${HOME}/.local/share/evolution
563blacklist ${HOME}/.local/share/FasterThanLight
556blacklist ${HOME}/.local/share/feedreader 564blacklist ${HOME}/.local/share/feedreader
557blacklist ${HOME}/.local/share/feral-interactive 565blacklist ${HOME}/.local/share/feral-interactive
558blacklist ${HOME}/.local/share/five-or-more 566blacklist ${HOME}/.local/share/five-or-more
@@ -581,6 +589,7 @@ blacklist ${HOME}/.local/share/godot
581blacklist ${HOME}/.local/share/gradio 589blacklist ${HOME}/.local/share/gradio
582blacklist ${HOME}/.local/share/gwenview 590blacklist ${HOME}/.local/share/gwenview
583blacklist ${HOME}/.local/share/i2p 591blacklist ${HOME}/.local/share/i2p
592blacklist ${HOME}/.local/share/IntoTheBreach
584blacklist ${HOME}/.local/share/kaffeine 593blacklist ${HOME}/.local/share/kaffeine
585blacklist ${HOME}/.local/share/kalgebra 594blacklist ${HOME}/.local/share/kalgebra
586blacklist ${HOME}/.local/share/kate 595blacklist ${HOME}/.local/share/kate
@@ -621,6 +630,7 @@ blacklist ${HOME}/.local/share/okular
621blacklist ${HOME}/.local/share/onlyoffice 630blacklist ${HOME}/.local/share/onlyoffice
622blacklist ${HOME}/.local/share/orage 631blacklist ${HOME}/.local/share/orage
623blacklist ${HOME}/.local/share/org.kde.gwenview 632blacklist ${HOME}/.local/share/org.kde.gwenview
633blacklist ${HOME}/.local/share/Paradox Interactive
624blacklist ${HOME}/.local/share/pix 634blacklist ${HOME}/.local/share/pix
625blacklist ${HOME}/.local/share/plasma_notes 635blacklist ${HOME}/.local/share/plasma_notes
626blacklist ${HOME}/.local/share/profanity 636blacklist ${HOME}/.local/share/profanity
@@ -654,12 +664,14 @@ blacklist ${HOME}/.local/share/zathura
654blacklist ${HOME}/.lv2 664blacklist ${HOME}/.lv2
655blacklist ${HOME}/.magicor 665blacklist ${HOME}/.magicor
656blacklist ${HOME}/.masterpdfeditor 666blacklist ${HOME}/.masterpdfeditor
667blacklist ${HOME}/.mbwarband
657blacklist ${HOME}/.mcabber 668blacklist ${HOME}/.mcabber
658blacklist ${HOME}/.mcabberrc 669blacklist ${HOME}/.mcabberrc
659blacklist ${HOME}/.mediathek3 670blacklist ${HOME}/.mediathek3
660blacklist ${HOME}/.megaglest 671blacklist ${HOME}/.megaglest
661blacklist ${HOME}/.minetest 672blacklist ${HOME}/.minetest
662blacklist ${HOME}/.mirrormagic 673blacklist ${HOME}/.mirrormagic
674blacklist ${HOME}/.moc
663blacklist ${HOME}/.moonchild productions/basilisk 675blacklist ${HOME}/.moonchild productions/basilisk
664blacklist ${HOME}/.moonchild productions/pale moon 676blacklist ${HOME}/.moonchild productions/pale moon
665blacklist ${HOME}/.mozilla 677blacklist ${HOME}/.mozilla
@@ -686,6 +698,7 @@ blacklist ${HOME}/.openttd
686blacklist ${HOME}/.opera 698blacklist ${HOME}/.opera
687blacklist ${HOME}/.opera-beta 699blacklist ${HOME}/.opera-beta
688blacklist ${HOME}/.ostrichriders 700blacklist ${HOME}/.ostrichriders
701blacklist ${HOME}/.paradoxinteractive
689blacklist ${HOME}/.parallelrealities/blobwars 702blacklist ${HOME}/.parallelrealities/blobwars
690blacklist ${HOME}/.penguin-command 703blacklist ${HOME}/.penguin-command
691blacklist ${HOME}/.pingus 704blacklist ${HOME}/.pingus
diff --git a/etc/profile-a-l/dino-im.profile b/etc/profile-a-l/dino-im.profile
new file mode 100644
index 000000000..ae0549d3e
--- /dev/null
+++ b/etc/profile-a-l/dino-im.profile
@@ -0,0 +1,14 @@
1# Firejail profile for dino-im
2# Description: Modern XMPP Chat Client using GTK+/Vala, Ubuntu specific bin name
3# This file is overwritten after every install/update
4# Persistent local customizations
5include dino-im.local
6# Persistent global definitions
7# added by included profile
8#include globals.local
9
10# Add Ubuntu specific binary name
11private-bin dino-im
12
13# Redirect
14include dino.profile
diff --git a/etc/profile-a-l/google-chrome-beta.profile b/etc/profile-a-l/google-chrome-beta.profile
index 73101f509..a62e4cf74 100644
--- a/etc/profile-a-l/google-chrome-beta.profile
+++ b/etc/profile-a-l/google-chrome-beta.profile
@@ -8,10 +8,16 @@ include globals.local
8noblacklist ${HOME}/.cache/google-chrome-beta 8noblacklist ${HOME}/.cache/google-chrome-beta
9noblacklist ${HOME}/.config/google-chrome-beta 9noblacklist ${HOME}/.config/google-chrome-beta
10 10
11noblacklist ${HOME}/.config/chrome-beta-flags.conf
12noblacklist ${HOME}/.config/chrome-beta-flags.config
13
11mkdir ${HOME}/.cache/google-chrome-beta 14mkdir ${HOME}/.cache/google-chrome-beta
12mkdir ${HOME}/.config/google-chrome-beta 15mkdir ${HOME}/.config/google-chrome-beta
13whitelist ${HOME}/.cache/google-chrome-beta 16whitelist ${HOME}/.cache/google-chrome-beta
14whitelist ${HOME}/.config/google-chrome-beta 17whitelist ${HOME}/.config/google-chrome-beta
15 18
19whitelist ${HOME}/.config/chrome-beta-flags.conf
20whitelist ${HOME}/.config/chrome-beta-flags.config
21
16# Redirect 22# Redirect
17include chromium-common.profile 23include chromium-common.profile
diff --git a/etc/profile-a-l/google-chrome-unstable.profile b/etc/profile-a-l/google-chrome-unstable.profile
index 50e9923aa..14547eab2 100644
--- a/etc/profile-a-l/google-chrome-unstable.profile
+++ b/etc/profile-a-l/google-chrome-unstable.profile
@@ -8,10 +8,16 @@ include globals.local
8noblacklist ${HOME}/.cache/google-chrome-unstable 8noblacklist ${HOME}/.cache/google-chrome-unstable
9noblacklist ${HOME}/.config/google-chrome-unstable 9noblacklist ${HOME}/.config/google-chrome-unstable
10 10
11noblacklist ${HOME}/.config/chrome-unstable-flags.conf
12noblacklist ${HOME}/.config/chrome-unstable-flags.config
13
11mkdir ${HOME}/.cache/google-chrome-unstable 14mkdir ${HOME}/.cache/google-chrome-unstable
12mkdir ${HOME}/.config/google-chrome-unstable 15mkdir ${HOME}/.config/google-chrome-unstable
13whitelist ${HOME}/.cache/google-chrome-unstable 16whitelist ${HOME}/.cache/google-chrome-unstable
14whitelist ${HOME}/.config/google-chrome-unstable 17whitelist ${HOME}/.config/google-chrome-unstable
15 18
19whitelist ${HOME}/.config/chrome-unstable-flags.conf
20whitelist ${HOME}/.config/chrome-unstable-flags.config
21
16# Redirect 22# Redirect
17include chromium-common.profile 23include chromium-common.profile
diff --git a/etc/profile-a-l/google-chrome.profile b/etc/profile-a-l/google-chrome.profile
index c69e98271..66f76caa0 100644
--- a/etc/profile-a-l/google-chrome.profile
+++ b/etc/profile-a-l/google-chrome.profile
@@ -8,10 +8,16 @@ include globals.local
8noblacklist ${HOME}/.cache/google-chrome 8noblacklist ${HOME}/.cache/google-chrome
9noblacklist ${HOME}/.config/google-chrome 9noblacklist ${HOME}/.config/google-chrome
10 10
11noblacklist ${HOME}/.config/chrome-flags.conf
12noblacklist ${HOME}/.config/chrome-flags.config
13
11mkdir ${HOME}/.cache/google-chrome 14mkdir ${HOME}/.cache/google-chrome
12mkdir ${HOME}/.config/google-chrome 15mkdir ${HOME}/.config/google-chrome
13whitelist ${HOME}/.cache/google-chrome 16whitelist ${HOME}/.cache/google-chrome
14whitelist ${HOME}/.config/google-chrome 17whitelist ${HOME}/.config/google-chrome
15 18
19whitelist ${HOME}/.config/chrome-flags.conf
20whitelist ${HOME}/.config/chrome-flags.config
21
16# Redirect 22# Redirect
17include chromium-common.profile 23include chromium-common.profile
diff --git a/etc/profile-m-z/mocp.profile b/etc/profile-m-z/mocp.profile
new file mode 100644
index 000000000..6fc7a4d67
--- /dev/null
+++ b/etc/profile-m-z/mocp.profile
@@ -0,0 +1,53 @@
1# Firejail profile for mocp
2# Description: A powerful & easy to use console audio player
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include mocp.local
7# Persistent global definitions
8include globals.local
9
10noblacklist ${HOME}/.moc
11noblacklist ${MUSIC}
12
13include disable-common.inc
14include disable-devel.inc
15include disable-exec.inc
16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc
19include disable-xdg.inc
20
21include whitelist-usr-share-common.inc
22include whitelist-runuser-common.inc
23include whitelist-var-common.inc
24
25apparmor
26caps.drop all
27ipc-namespace
28netfilter
29no3d
30nodvd
31nogroups
32nonewprivs
33noroot
34notv
35nou2f
36novideo
37protocol unix,inet,inet6,netlink
38seccomp
39shell none
40tracelog
41
42private-bin mocp
43private-cache
44private-dev
45private-etc alternatives,asound.conf,ca-certificates,crypto-policies,group,machine-id,pki,pulse,resolv.conf,ssl
46private-tmp
47
48dbus-user none
49dbus-system none
50
51memory-deny-write-execute
52read-only ${HOME}
53read-write ${HOME}/.moc
diff --git a/etc/profile-m-z/mpg123.profile b/etc/profile-m-z/mpg123.profile
index 6e18aa401..b1ab81c1e 100644
--- a/etc/profile-m-z/mpg123.profile
+++ b/etc/profile-m-z/mpg123.profile
@@ -1,13 +1,13 @@
1# Firejail profile for mpg123 1# Firejail profile for mpg123
2# Description: MPEG audio player/decoder 2# Description: MPEG audio player/decoder
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include mpg123.local 6include mpg123.local
6# Persistent global definitions 7# Persistent global definitions
7include globals.local 8include globals.local
8 9
9noblacklist ${MUSIC} 10noblacklist ${MUSIC}
10noblacklist ${VIDEOS}
11 11
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
@@ -23,19 +23,23 @@ include whitelist-var-common.inc
23apparmor 23apparmor
24caps.drop all 24caps.drop all
25netfilter 25netfilter
26no3d
26nogroups 27nogroups
27nonewprivs 28nonewprivs
28noroot 29noroot
30notv
29nou2f 31nou2f
32novideo
30protocol unix,inet,inet6,netlink 33protocol unix,inet,inet6,netlink
31seccomp 34seccomp
32shell none 35shell none
36tracelog
33 37
34#private-bin mpg123* 38#private-bin mpg123*
35private-dev 39private-dev
36private-tmp 40private-tmp
37 41
38memory-deny-write-execute
39
40dbus-user none 42dbus-user none
41dbus-system none 43dbus-system none
44
45memory-deny-write-execute
diff --git a/etc/profile-m-z/plv.profile b/etc/profile-m-z/plv.profile
new file mode 100644
index 000000000..7ff59ea77
--- /dev/null
+++ b/etc/profile-m-z/plv.profile
@@ -0,0 +1,59 @@
1# Firejail profile for plv
2# Description: Inspect pacman log files
3# This file is overwritten after every install/update
4# Persistent local customizations
5include plv.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.config/PacmanLogViewer
10
11include disable-common.inc
12include disable-devel.inc
13include disable-exec.inc
14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc
17include disable-xdg.inc
18
19mkdir ${HOME}/.config/PacmanLogViewer
20whitelist ${HOME}/.config/PacmanLogViewer
21whitelist /var/log/pacman*
22include whitelist-common.inc
23include whitelist-usr-share-common.inc
24include whitelist-runuser-common.inc
25include whitelist-var-common.inc
26
27apparmor
28caps.drop all
29ipc-namespace
30machine-id
31net none
32no3d
33nodvd
34nogroups
35nonewprivs
36noroot
37nosound
38notv
39nou2f
40novideo
41seccomp
42shell none
43tracelog
44
45disable-mnt
46private-bin plv
47private-cache
48private-dev
49private-etc alternatives,fonts
50private-opt none
51private-tmp
52writable-var-log
53
54dbus-user none
55dbus-system none
56
57#memory-deny-write-execute - breaks opening file-chooser
58read-only ${HOME}
59read-write ${HOME}/.config/PacmanLogViewer
diff --git a/etc/profile-m-z/secret-tool.profile b/etc/profile-m-z/secret-tool.profile
index 70d9a5b1d..99ba11d30 100644
--- a/etc/profile-m-z/secret-tool.profile
+++ b/etc/profile-m-z/secret-tool.profile
@@ -1,6 +1,7 @@
1# Firejail profile for secret-tool 1# Firejail profile for secret-tool
2# Description: Library for storing and retrieving passwords and other secrets 2# Description: Library for storing and retrieving passwords and other secrets
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include secret-tool.local 6include secret-tool.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/profile-m-z/steam.profile b/etc/profile-m-z/steam.profile
index a5e9a9932..004664a79 100644
--- a/etc/profile-m-z/steam.profile
+++ b/etc/profile-m-z/steam.profile
@@ -10,12 +10,17 @@ noblacklist ${HOME}/.killingfloor
10noblacklist ${HOME}/.local/share/3909/PapersPlease 10noblacklist ${HOME}/.local/share/3909/PapersPlease
11noblacklist ${HOME}/.local/share/aspyr-media 11noblacklist ${HOME}/.local/share/aspyr-media
12noblacklist ${HOME}/.local/share/cdprojektred 12noblacklist ${HOME}/.local/share/cdprojektred
13noblacklist ${HOME}/.local/share/FasterThanLight
13noblacklist ${HOME}/.local/share/feral-interactive 14noblacklist ${HOME}/.local/share/feral-interactive
15noblacklist ${HOME}/.local/share/IntoTheBreach
16noblacklist ${HOME}/.local/share/Paradox Interactive
14noblacklist ${HOME}/.local/share/Steam 17noblacklist ${HOME}/.local/share/Steam
15noblacklist ${HOME}/.local/share/SuperHexagon 18noblacklist ${HOME}/.local/share/SuperHexagon
16noblacklist ${HOME}/.local/share/Terraria 19noblacklist ${HOME}/.local/share/Terraria
17noblacklist ${HOME}/.local/share/vpltd 20noblacklist ${HOME}/.local/share/vpltd
18noblacklist ${HOME}/.local/share/vulkan 21noblacklist ${HOME}/.local/share/vulkan
22noblacklist ${HOME}/.mbwarband
23noblacklist ${HOME}/.paradoxinteractive
19noblacklist ${HOME}/.steam 24noblacklist ${HOME}/.steam
20noblacklist ${HOME}/.steampath 25noblacklist ${HOME}/.steampath
21noblacklist ${HOME}/.steampid 26noblacklist ${HOME}/.steampid
@@ -41,7 +46,9 @@ mkdir ${HOME}/.killingfloor
41mkdir ${HOME}/.local/share/3909/PapersPlease 46mkdir ${HOME}/.local/share/3909/PapersPlease
42mkdir ${HOME}/.local/share/aspyr-media 47mkdir ${HOME}/.local/share/aspyr-media
43mkdir ${HOME}/.local/share/cdprojektred 48mkdir ${HOME}/.local/share/cdprojektred
49mkdir ${HOME}/.local/share/FasterThanLight
44mkdir ${HOME}/.local/share/feral-interactive 50mkdir ${HOME}/.local/share/feral-interactive
51mkdir ${HOME}/.local/share/IntoTheBreach
45mkdir ${HOME}/.local/share/Paradox Interactive 52mkdir ${HOME}/.local/share/Paradox Interactive
46mkdir ${HOME}/.local/share/Steam 53mkdir ${HOME}/.local/share/Steam
47mkdir ${HOME}/.local/share/SuperHexagon 54mkdir ${HOME}/.local/share/SuperHexagon
@@ -58,7 +65,9 @@ whitelist ${HOME}/.killingfloor
58whitelist ${HOME}/.local/share/3909/PapersPlease 65whitelist ${HOME}/.local/share/3909/PapersPlease
59whitelist ${HOME}/.local/share/aspyr-media 66whitelist ${HOME}/.local/share/aspyr-media
60whitelist ${HOME}/.local/share/cdprojektred 67whitelist ${HOME}/.local/share/cdprojektred
68whitelist ${HOME}/.local/share/FasterThanLight
61whitelist ${HOME}/.local/share/feral-interactive 69whitelist ${HOME}/.local/share/feral-interactive
70whitelist ${HOME}/.local/share/IntoTheBreach
62whitelist ${HOME}/.local/share/Paradox Interactive 71whitelist ${HOME}/.local/share/Paradox Interactive
63whitelist ${HOME}/.local/share/Steam 72whitelist ${HOME}/.local/share/Steam
64whitelist ${HOME}/.local/share/SuperHexagon 73whitelist ${HOME}/.local/share/SuperHexagon
@@ -70,7 +79,6 @@ whitelist ${HOME}/.paradoxinteractive
70whitelist ${HOME}/.steam 79whitelist ${HOME}/.steam
71whitelist ${HOME}/.steampath 80whitelist ${HOME}/.steampath
72whitelist ${HOME}/.steampid 81whitelist ${HOME}/.steampid
73whitelist ${HOME}/.steampid
74include whitelist-common.inc 82include whitelist-common.inc
75include whitelist-var-common.inc 83include whitelist-var-common.inc
76 84
diff --git a/etc/profile-m-z/wire-desktop.profile b/etc/profile-m-z/wire-desktop.profile
index c1250b1f0..8f6014dc3 100644
--- a/etc/profile-m-z/wire-desktop.profile
+++ b/etc/profile-m-z/wire-desktop.profile
@@ -9,7 +9,6 @@ include wire-desktop.local
9 9
10# Debian/Ubuntu use /opt/Wire. As that is not in PATH by default, run `firejail /opt/Wire/wire-desktop` to start it. 10# Debian/Ubuntu use /opt/Wire. As that is not in PATH by default, run `firejail /opt/Wire/wire-desktop` to start it.
11 11
12ignore caps.drop all
13ignore dbus-user none 12ignore dbus-user none
14ignore dbus-system none 13ignore dbus-system none
15 14
@@ -22,8 +21,9 @@ mkdir ${HOME}/.config/Wire
22whitelist ${HOME}/.config/Wire 21whitelist ${HOME}/.config/Wire
23include whitelist-common.inc 22include whitelist-common.inc
24 23
25caps.keep sys_admin,sys_chroot
26nou2f 24nou2f
25ignore seccomp
26seccomp !chroot
27shell none 27shell none
28 28
29disable-mnt 29disable-mnt
diff --git a/etc/profile-m-z/yelp.profile b/etc/profile-m-z/yelp.profile
index 7053f98e8..08b31f1ff 100644
--- a/etc/profile-m-z/yelp.profile
+++ b/etc/profile-m-z/yelp.profile
@@ -21,6 +21,7 @@ whitelist ${HOME}/.config/yelp
21whitelist /usr/share/doc 21whitelist /usr/share/doc
22whitelist /usr/share/help 22whitelist /usr/share/help
23whitelist /usr/share/yelp 23whitelist /usr/share/yelp
24whitelist /usr/share/yelp-tools
24whitelist /usr/share/yelp-xsl 25whitelist /usr/share/yelp-xsl
25include whitelist-common.inc 26include whitelist-common.inc
26include whitelist-runuser-common.inc 27include whitelist-runuser-common.inc
diff --git a/mkdeb.sh b/mkdeb.sh
deleted file mode 100755
index dd784eb8a..000000000
--- a/mkdeb.sh
+++ /dev/null
@@ -1,56 +0,0 @@
1#!/bin/sh
2# This file is part of Firejail project
3# Copyright (C) 2014-2020 Firejail Authors
4# License GPL v2
5
6# based on http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/
7# a code archive should already be available
8
9set -e
10
11TOP=`pwd`
12CODE_ARCHIVE="$1-$2.tar.xz"
13CODE_DIR="$1-$2"
14INSTALL_DIR="${INSTALL_DIR}${CODE_DIR}/debian"
15DEBIAN_CTRL_DIR="${DEBIAN_CTRL_DIR}${CODE_DIR}/debian/DEBIAN"
16
17echo "*****************************************"
18echo "code archive: $CODE_ARCHIVE"
19echo "code directory: $CODE_DIR"
20echo "install directory: $INSTALL_DIR"
21echo "debian control directory: $DEBIAN_CTRL_DIR"
22echo "*****************************************"
23
24tar -xJvf $CODE_ARCHIVE
25#mkdir -p $INSTALL_DIR
26cd $CODE_DIR
27./configure --prefix=/usr
28make -j2
29mkdir debian
30DESTDIR=debian make install-strip
31
32cd ..
33echo "*****************************************"
34SIZE=`du -s $INSTALL_DIR`
35echo "install size $SIZE"
36echo "*****************************************"
37
38mv $INSTALL_DIR/usr/share/doc/firejail/RELNOTES $INSTALL_DIR/usr/share/doc/firejail/changelog.Debian
39gzip -9 -n $INSTALL_DIR/usr/share/doc/firejail/changelog.Debian
40rm $INSTALL_DIR/usr/share/doc/firejail/COPYING
41install -m644 platform/debian/copyright $INSTALL_DIR/usr/share/doc/firejail/.
42mkdir -p $DEBIAN_CTRL_DIR
43sed "s/FIREJAILVER/$2/g" platform/debian/control.$(dpkg-architecture -qDEB_HOST_ARCH) > $DEBIAN_CTRL_DIR/control
44
45mkdir -p $INSTALL_DIR/usr/share/lintian/overrides/
46install -m644 platform/debian/firejail.lintian-overrides $INSTALL_DIR/usr/share/lintian/overrides/firejail
47
48find $INSTALL_DIR/etc -type f | sed "s,^$INSTALL_DIR,," | LC_ALL=C sort > $DEBIAN_CTRL_DIR/conffiles
49chmod 644 $DEBIAN_CTRL_DIR/conffiles
50find $INSTALL_DIR -type d | xargs chmod 755
51cd $CODE_DIR
52fakeroot dpkg-deb --build debian
53lintian debian.deb
54mv debian.deb ../firejail_$2_1_$(dpkg-architecture -qDEB_HOST_ARCH).deb
55cd ..
56rm -fr $CODE_DIR
diff --git a/mkdeb-apparmor.sh b/mkdeb.sh.in
index 3c560179c..efb477920 100755
--- a/mkdeb-apparmor.sh
+++ b/mkdeb.sh.in
@@ -7,10 +7,24 @@
7# a code archive should already be available 7# a code archive should already be available
8 8
9set -e 9set -e
10NAME=@PACKAGE_NAME@
11VERSION=@PACKAGE_VERSION@
12PACKAGE_TARNAME=@PACKAGE_TARNAME@
13HAVE_APPARMOR=@HAVE_APPARMOR@
14HAVE_SELINUX=@HAVE_SELINUX@
15EXTRA_VERSION=$1
16
17CONFIG_ARGS="--prefix=/usr"
18if [ -n "$HAVE_APPARMOR" ]; then
19 CONFIG_ARGS="$CONFIG_ARGS --enable-apparmor"
20fi
21if [ -n "$HAVE_SELINUX" ]; then
22 CONFIG_ARGS="$CONFIG_ARGS --enable-selinux"
23fi
10 24
11TOP=`pwd` 25TOP=`pwd`
12CODE_ARCHIVE="$1-$2.tar.xz" 26CODE_ARCHIVE="$NAME-$VERSION.tar.xz"
13CODE_DIR="$1-$2" 27CODE_DIR="$NAME-$VERSION"
14INSTALL_DIR="${INSTALL_DIR}${CODE_DIR}/debian" 28INSTALL_DIR="${INSTALL_DIR}${CODE_DIR}/debian"
15DEBIAN_CTRL_DIR="${DEBIAN_CTRL_DIR}${CODE_DIR}/debian/DEBIAN" 29DEBIAN_CTRL_DIR="${DEBIAN_CTRL_DIR}${CODE_DIR}/debian/DEBIAN"
16 30
@@ -24,7 +38,7 @@ echo "*****************************************"
24tar -xJvf $CODE_ARCHIVE 38tar -xJvf $CODE_ARCHIVE
25#mkdir -p $INSTALL_DIR 39#mkdir -p $INSTALL_DIR
26cd $CODE_DIR 40cd $CODE_DIR
27./configure --prefix=/usr --enable-apparmor 41./configure $CONFIG_ARGS
28make -j2 42make -j2
29mkdir debian 43mkdir debian
30DESTDIR=debian make install-strip 44DESTDIR=debian make install-strip
@@ -40,7 +54,7 @@ gzip -9 -n $INSTALL_DIR/usr/share/doc/firejail/changelog.Debian
40rm $INSTALL_DIR/usr/share/doc/firejail/COPYING 54rm $INSTALL_DIR/usr/share/doc/firejail/COPYING
41install -m644 platform/debian/copyright $INSTALL_DIR/usr/share/doc/firejail/. 55install -m644 platform/debian/copyright $INSTALL_DIR/usr/share/doc/firejail/.
42mkdir -p $DEBIAN_CTRL_DIR 56mkdir -p $DEBIAN_CTRL_DIR
43sed "s/FIREJAILVER/$2/g" platform/debian/control.$(dpkg-architecture -qDEB_HOST_ARCH) > $DEBIAN_CTRL_DIR/control 57sed "s/FIREJAILVER/$VERSION/g" platform/debian/control.$(dpkg-architecture -qDEB_HOST_ARCH) > $DEBIAN_CTRL_DIR/control
44 58
45mkdir -p $INSTALL_DIR/usr/share/lintian/overrides/ 59mkdir -p $INSTALL_DIR/usr/share/lintian/overrides/
46install -m644 platform/debian/firejail.lintian-overrides $INSTALL_DIR/usr/share/lintian/overrides/firejail 60install -m644 platform/debian/firejail.lintian-overrides $INSTALL_DIR/usr/share/lintian/overrides/firejail
@@ -51,6 +65,6 @@ find $INSTALL_DIR -type d | xargs chmod 755
51cd $CODE_DIR 65cd $CODE_DIR
52fakeroot dpkg-deb --build debian 66fakeroot dpkg-deb --build debian
53lintian debian.deb 67lintian debian.deb
54mv debian.deb ../firejail-apparmor_$2_1_$(dpkg-architecture -qDEB_HOST_ARCH).deb 68mv debian.deb ../firejail_${VERSION}${EXTRA_VERSION}_1_$(dpkg-architecture -qDEB_HOST_ARCH).deb
55cd .. 69cd ..
56rm -fr $CODE_DIR 70rm -fr $CODE_DIR
diff --git a/platform/rpm/firejail.spec b/platform/rpm/firejail.spec
index b32407c7d..da91f5a4f 100644
--- a/platform/rpm/firejail.spec
+++ b/platform/rpm/firejail.spec
@@ -1,7 +1,7 @@
1Name: __NAME__ 1Name: __NAME__
2Version: __VERSION__ 2Version: __VERSION__
3Release: 1 3Release: 1
4Summary: Linux namepaces sandbox program 4Summary: Linux namespaces sandbox program
5 5
6License: GPLv2+ 6License: GPLv2+
7Group: Development/Tools 7Group: Development/Tools
@@ -19,7 +19,7 @@ using Linux namespaces. It includes a sandbox profile for Mozilla Firefox.
19%setup -q 19%setup -q
20 20
21%build 21%build
22%configure --disable-userns --disable-contrib-install 22%configure __CONFIG_OPT__
23make %{?_smp_mflags} 23make %{?_smp_mflags}
24 24
25%install 25%install
diff --git a/platform/rpm/mkrpm.sh b/platform/rpm/mkrpm.sh
index 348bea7f2..2bdead7a8 100755
--- a/platform/rpm/mkrpm.sh
+++ b/platform/rpm/mkrpm.sh
@@ -3,7 +3,7 @@
3# Copyright (C) 2014-2020 Firejail Authors 3# Copyright (C) 2014-2020 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# Usage: ./platform/rpm/mkrpm.sh firejail <version> 6# Usage: ./platform/rpm/mkrpm.sh firejail <version> "<config options>"
7# 7#
8# Builds rpms in a temporary directory then places the result in the 8# Builds rpms in a temporary directory then places the result in the
9# current working directory. 9# current working directory.
@@ -11,6 +11,7 @@
11name=$1 11name=$1
12# Strip any trailing prefix from the version like -rc1 etc 12# Strip any trailing prefix from the version like -rc1 etc
13version=$(echo "$2" | sed 's/\-.*//g') 13version=$(echo "$2" | sed 's/\-.*//g')
14config_opt=$3
14 15
15if [[ ! -f platform/rpm/${name}.spec ]]; then 16if [[ ! -f platform/rpm/${name}.spec ]]; then
16 echo error: spec file not found for name \"${name}\" 17 echo error: spec file not found for name \"${name}\"
@@ -22,6 +23,10 @@ if [[ -z "${version}" ]]; then
22 exit 1 23 exit 1
23fi 24fi
24 25
26if [[ -z "${config_opt}" ]]; then
27 config_opt="--disable-userns --disable-contrib-install"
28fi
29
25# Make a temporary directory and arrange to clean up on exit 30# Make a temporary directory and arrange to clean up on exit
26tmpdir=$(mktemp -d) 31tmpdir=$(mktemp -d)
27mkdir -p ${tmpdir}/{BUILD,RPMS,SOURCES,SPECS,SRPMS} 32mkdir -p ${tmpdir}/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
@@ -32,7 +37,10 @@ trap cleanup EXIT
32 37
33# Create the spec file 38# Create the spec file
34tmp_spec_file=${tmpdir}/SPECS/${name}.spec 39tmp_spec_file=${tmpdir}/SPECS/${name}.spec
35sed -e "s/__NAME__/${name}/g" -e "s/__VERSION__/${version}/g" platform/rpm/${name}.spec >${tmp_spec_file} 40sed -e "s/__NAME__/${name}/g" \
41 -e "s/__VERSION__/${version}/g" \
42 -e "s/__CONFIG_OPT__/${config_opt}/g" \
43 platform/rpm/${name}.spec >${tmp_spec_file}
36# FIXME: We could parse RELNOTES and create a %changelog section here 44# FIXME: We could parse RELNOTES and create a %changelog section here
37 45
38# Copy the source to build into a tarball 46# Copy the source to build into a tarball
diff --git a/src/firecfg/firecfg.config b/src/firecfg/firecfg.config
index 2ed70664b..251b23905 100644
--- a/src/firecfg/firecfg.config
+++ b/src/firecfg/firecfg.config
@@ -156,6 +156,7 @@ dig
156digikam 156digikam
157dillo 157dillo
158dino 158dino
159dino-im
159discord 160discord
160discord-canary 161discord-canary
161display 162display
@@ -441,6 +442,7 @@ min
441mindless 442mindless
442minetest 443minetest
443mirrormagic 444mirrormagic
445mocp
444mousepad 446mousepad
445mp3splt 447mp3splt
446mp3splt-gtk 448mp3splt-gtk
@@ -549,6 +551,7 @@ planmaker18
549planmaker18free 551planmaker18free
550playonlinux 552playonlinux
551pluma 553pluma
554plv
552pngquant 555pngquant
553polari 556polari
554ppsspp 557ppsspp
diff --git a/src/firejail/fs.c b/src/firejail/fs.c
index b906f3047..2000ffc62 100644
--- a/src/firejail/fs.c
+++ b/src/firejail/fs.c
@@ -111,6 +111,13 @@ static void disable_file(OPERATION op, const char *filename) {
111 return; 111 return;
112 } 112 }
113 113
114 // check for firejail executable
115 // we migth have a file found in ${PATH} pointing to /usr/bin/firejail
116 // blacklisting it here will end up breaking situations like user clicks on a link in Thunderbird
117 // and expects Firefox to open in the same sandbox
118 if (strcmp(BINDIR "/firejail", fname) == 0)
119 return;
120
114 // modify the file 121 // modify the file
115 if (op == BLACKLIST_FILE || op == BLACKLIST_NOLOG) { 122 if (op == BLACKLIST_FILE || op == BLACKLIST_NOLOG) {
116 // some distros put all executables under /usr/bin and make /bin a symbolic link 123 // some distros put all executables under /usr/bin and make /bin a symbolic link
diff --git a/test/fs/mkdir_mkfile.exp b/test/fs/mkdir_mkfile.exp
index 109984035..82dab1ddf 100755
--- a/test/fs/mkdir_mkfile.exp
+++ b/test/fs/mkdir_mkfile.exp
@@ -22,23 +22,23 @@ expect {
22 "_firejail_test_dir" 22 "_firejail_test_dir"
23} 23}
24expect { 24expect {
25 timeout {puts "TESTING ERROR 1\n";exit} 25 timeout {puts "TESTING ERROR 2\n";exit}
26 "_firejail_test_dir/dir1" 26 "_firejail_test_dir/dir1"
27} 27}
28expect { 28expect {
29 timeout {puts "TESTING ERROR 1\n";exit} 29 timeout {puts "TESTING ERROR 3\n";exit}
30 "_firejail_test_dir/dir1/dir2" 30 "_firejail_test_dir/dir1/dir2"
31} 31}
32expect { 32expect {
33 timeout {puts "TESTING ERROR 1\n";exit} 33 timeout {puts "TESTING ERROR 4\n";exit}
34 "_firejail_test_dir/dir1/dir2/dir3" 34 "_firejail_test_dir/dir1/dir2/dir3"
35} 35}
36expect { 36expect {
37 timeout {puts "TESTING ERROR 1\n";exit} 37 timeout {puts "TESTING ERROR 5\n";exit}
38 "_firejail_test_dir/dir1/dir2/dir3/file1" 38 "_firejail_test_dir/dir1/dir2/dir3/file1"
39} 39}
40expect { 40expect {
41 timeout {puts "TESTING ERROR 1\n";exit} 41 timeout {puts "TESTING ERROR 6\n";exit}
42 "_firejail_test_file" 42 "_firejail_test_file"
43} 43}
44after 100 44after 100
@@ -47,8 +47,8 @@ after 100
47 47
48send -- "firejail --profile=mkfile.profile\r" 48send -- "firejail --profile=mkfile.profile\r"
49expect { 49expect {
50 timeout {puts "TESTING ERROR 1\n";exit} 50 timeout {puts "TESTING ERROR 7\n";exit}
51 "only files in user home or /tmp" 51 "only files or directories in user home, /tmp"
52} 52}
53after 100 53after 100
54 54
diff --git a/test/utils/build.exp b/test/utils/build.exp
index ae46ffa6e..ac4f30326 100755
--- a/test/utils/build.exp
+++ b/test/utils/build.exp
@@ -7,22 +7,21 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "echo testing > ~/firejail-test-file-7699\r"
11after 100
12
10send -- "firejail --build cat ~/firejail-test-file-7699\r" 13send -- "firejail --build cat ~/firejail-test-file-7699\r"
11expect { 14expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 15 timeout {puts "TESTING ERROR 0\n";exit}
13 "whitelist ~/firejail-test-file-7699" 16 "whitelist $\{HOME\}/firejail-test-file-7699"
14}
15expect {
16 timeout {puts "TESTING ERROR 0.1\n";exit}
17 "include /etc/firejail/whitelist-common.inc"
18} 17}
19expect { 18expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
21 "private-tmp" 20 "include whitelist-common.inc"
22} 21}
23expect { 22expect {
24 timeout {puts "TESTING ERROR 2\n";exit} 23 timeout {puts "TESTING ERROR 2\n";exit}
25 "private-dev" 24 "blacklist /usr/share"
26} 25}
27expect { 26expect {
28 timeout {puts "TESTING ERROR 3\n";exit} 27 timeout {puts "TESTING ERROR 3\n";exit}
@@ -34,26 +33,40 @@ expect {
34} 33}
35expect { 34expect {
36 timeout {puts "TESTING ERROR 5\n";exit} 35 timeout {puts "TESTING ERROR 5\n";exit}
37 "caps.drop all" 36 "private-dev"
38} 37}
39expect { 38expect {
40 timeout {puts "TESTING ERROR 6\n";exit} 39 timeout {puts "TESTING ERROR 6\n";exit}
41 "nonewprivs" 40 "private-etc"
42} 41}
43expect { 42expect {
44 timeout {puts "TESTING ERROR 7\n";exit} 43 timeout {puts "TESTING ERROR 7\n";exit}
45 "seccomp" 44 "private-tmp"
46} 45}
47expect { 46expect {
48 timeout {puts "TESTING ERROR 8\n";exit} 47 timeout {puts "TESTING ERROR 8\n";exit}
49 "net none" 48 "caps.drop all"
50} 49}
51expect { 50expect {
52 timeout {puts "TESTING ERROR 9\n";exit} 51 timeout {puts "TESTING ERROR 9\n";exit}
52 "nonewprivs"
53}
54expect {
55 timeout {puts "TESTING ERROR 10\n";exit}
56 "seccomp"
57}
58expect {
59 timeout {puts "TESTING ERROR 11\n";exit}
60 "net none"
61}
62expect {
63 timeout {puts "TESTING ERROR 12\n";exit}
53 "shell none" 64 "shell none"
54} 65}
55after 100 66after 100
56 67
68
69
57send -- "firejail --build cat /etc/passwd\r" 70send -- "firejail --build cat /etc/passwd\r"
58expect { 71expect {
59 timeout {puts "TESTING ERROR 10\n";exit} 72 timeout {puts "TESTING ERROR 10\n";exit}
@@ -72,21 +85,6 @@ expect {
72} 85}
73after 100 86after 100
74 87
75
76#send -- "firejail --build cat /var/tmp/firejail-test-file-7699\r"
77#expect {
78# timeout {puts "TESTING ERROR 11\n";exit}
79# "whitelist /var/tmp/firejail-test-file-7699"
80#}
81#after 100
82
83#send -- "firejail --build man firejail\r"
84#expect {
85# timeout {puts "TESTING ERROR 12\n";exit}
86# "whitelist /usr/share/man"
87#}
88#after 100
89
90send -- "firejail --build wget --output-document=~ debian.org\r" 88send -- "firejail --build wget --output-document=~ debian.org\r"
91expect { 89expect {
92 timeout {puts "TESTING ERROR 13\n";exit} 90 timeout {puts "TESTING ERROR 13\n";exit}
@@ -98,10 +96,4 @@ expect {
98} 96}
99after 100 97after 100
100 98
101
102send -- "firejail --build cat /tmp/firejail-test-file-7699\r"
103#todo - bug: it comes back with private-tmp
104sleep 1
105
106
107puts "all done\n" 99puts "all done\n"
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index 82ccc82bb..48a8051fa 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -13,14 +13,9 @@ if [ -f /etc/debian_version ]; then
13fi 13fi
14export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail" 14export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail"
15 15
16echo "testing" > ~/firejail-test-file-7699
17echo "testing" > /tmp/firejail-test-file-7699
18echo "testing" > /var/tmp/firejail-test-file-7699
19echo "TESTING: build (test/utils/build.exp)" 16echo "TESTING: build (test/utils/build.exp)"
20./build.exp 17./build.exp
21rm -f ~/firejail-test-file-7699 18rm -f ~/firejail-test-file-7699
22rm -f /tmp/firejail-test-file-7699
23rm -f /var/tmp/firejail-test-file-7699
24rm -f firejail-test-file-4388 19rm -f firejail-test-file-4388
25 20
26if [ $(readlink /proc/self) -lt 100 ]; then 21if [ $(readlink /proc/self) -lt 100 ]; then