aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.in3
-rw-r--r--README.md27
-rw-r--r--RELNOTES3
-rwxr-xr-xconfigure17
-rw-r--r--configure.ac3
-rw-r--r--etc/2048-qt.profile3
-rw-r--r--etc/Screenshot.profile6
-rw-r--r--etc/Viber.profile1
-rw-r--r--etc/asunder.profile4
-rw-r--r--etc/atool.profile1
-rw-r--r--etc/baobab.profile1
-rw-r--r--etc/bluefish.profile1
-rw-r--r--etc/brasero.profile3
-rw-r--r--etc/calibre.profile1
-rw-r--r--etc/catfish.profile1
-rw-r--r--etc/curl.profile2
-rw-r--r--etc/default.profile10
-rw-r--r--etc/deluge.profile2
-rw-r--r--etc/dia.profile3
-rw-r--r--etc/dig.profile3
-rw-r--r--etc/disable-common.inc22
-rw-r--r--etc/disable-devel.inc1
-rw-r--r--etc/disable-programs.inc3
-rw-r--r--etc/discord-common.profile9
-rw-r--r--etc/fbreader.profile4
-rw-r--r--etc/file-roller.profile2
-rw-r--r--etc/file.profile4
-rw-r--r--etc/firejail-default2
-rw-r--r--etc/freeciv.profile1
-rw-r--r--etc/freeoffice-planmaker.profile2
-rw-r--r--etc/freeoffice-presentations.profile2
-rw-r--r--etc/freeoffice-textmaker.profile2
-rw-r--r--etc/frozen-bubble.profile2
-rw-r--r--etc/gitg.profile8
-rw-r--r--etc/gnome-maps.profile1
-rw-r--r--etc/gnome-screenshot.profile47
-rw-r--r--etc/gnome-sound-recorder.profile1
-rw-r--r--etc/handbrake.profile2
-rw-r--r--etc/host.profile49
-rw-r--r--etc/kino.profile3
-rw-r--r--etc/leafpad.profile3
-rw-r--r--etc/lincity-ng.profile1
-rw-r--r--etc/lrzuntar.profile1
-rw-r--r--etc/lximage-qt.profile4
-rw-r--r--etc/lxmusic.profile1
-rw-r--r--etc/lzcat.profile1
-rw-r--r--etc/lzcmp.profile1
-rw-r--r--etc/lzegrep.profile1
-rw-r--r--etc/lzfgrep.profile1
-rw-r--r--etc/lzgrep.profile1
-rw-r--r--etc/lzip.profile1
-rw-r--r--etc/lzless.profile1
-rw-r--r--etc/lzma.profile1
-rw-r--r--etc/lzmainfo.profile1
-rw-r--r--etc/lzmore.profile1
-rw-r--r--etc/mate-calc.profile2
-rw-r--r--etc/mate-dictionary.profile1
-rw-r--r--etc/midori.profile3
-rw-r--r--etc/mousepad.profile3
-rw-r--r--etc/mplayer.profile2
-rw-r--r--etc/mupdf.profile1
-rw-r--r--etc/musescore.profile1
-rw-r--r--etc/nslookup.profile49
-rw-r--r--etc/open-invaders.profile3
-rw-r--r--etc/opencity.profile1
-rw-r--r--etc/openclonk.profile4
-rw-r--r--etc/openttd.profile3
-rw-r--r--etc/ping.profile1
-rw-r--r--etc/pingus.profile3
-rw-r--r--etc/planmaker18.profile2
-rw-r--r--etc/planmaker18free.profile2
-rw-r--r--etc/ppsspp.profile1
-rw-r--r--etc/presentations18.profile3
-rw-r--r--etc/presentations18free.profile2
-rw-r--r--etc/qpdfview.profile1
-rw-r--r--etc/ripperx.profile41
-rw-r--r--etc/scribus.profile1
-rw-r--r--etc/slack.profile2
-rw-r--r--etc/sol.profile1
-rw-r--r--etc/sound-juicer.profile41
-rw-r--r--etc/steam.profile7
-rw-r--r--etc/supertux2.profile2
-rw-r--r--etc/tcpdump.profile1
-rw-r--r--etc/terasology.profile1
-rw-r--r--etc/textmaker18.profile3
-rw-r--r--etc/textmaker18free.profile3
-rw-r--r--etc/tshark.profile1
-rw-r--r--etc/tuxguitar.profile2
-rw-r--r--etc/unlzma.profile1
-rw-r--r--etc/unxz.profile1
-rw-r--r--etc/warzone2100.profile1
-rw-r--r--etc/wget.profile1
-rw-r--r--etc/whois.profile1
-rw-r--r--etc/x-terminal-emulator.profile1
-rw-r--r--etc/xcalc.profile1
-rw-r--r--etc/xfce4-dict.profile3
-rw-r--r--etc/xfce4-notes.profile3
-rw-r--r--etc/xpdf.profile3
-rw-r--r--etc/xxd.profile3
-rw-r--r--etc/xz.profile1
-rw-r--r--etc/xzcat.profile1
-rw-r--r--etc/xzcmp.profile1
-rw-r--r--etc/xzdiff.profile1
-rw-r--r--etc/xzegrep.profile1
-rw-r--r--etc/xzfgrep.profile1
-rw-r--r--etc/xzmore.profile1
-rw-r--r--etc/zathura.profile4
-rw-r--r--etc/zoom.profile4
-rw-r--r--src/firecfg/firecfg.config8
-rw-r--r--src/firejail/firejail.h4
-rw-r--r--src/firejail/fs.c204
-rw-r--r--src/firejail/profile.c5
-rw-r--r--src/man/firejail-profile.txt2
-rw-r--r--src/profstats/Makefile.in14
-rw-r--r--src/profstats/main.c240
116 files changed, 856 insertions, 132 deletions
diff --git a/.gitignore b/.gitignore
index 9995da44c..661370b02 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,7 @@ src/fsec-optimize/fsec-optimize
33src/fcopy/fcopy 33src/fcopy/fcopy
34src/fldd/fldd 34src/fldd/fldd
35src/fbuilder/fbuilder 35src/fbuilder/fbuilder
36etc/profstats
36uids.h 37uids.h
37seccomp 38seccomp
38seccomp.debug 39seccomp.debug
diff --git a/Makefile.in b/Makefile.in
index 0285d8592..f7c94aa09 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,7 @@
1all: apps man filters 1all: apps man filters
2MYLIBS = src/lib 2MYLIBS = src/lib
3APPS = src/firejail src/firemon src/fsec-print src/fsec-optimize src/firecfg src/fnetfilter src/libtrace src/libtracelog src/ftee src/faudit src/fnet src/fseccomp src/fbuilder src/fcopy src/fldd src/libpostexecseccomp 3APPS = src/firejail src/firemon src/fsec-print src/fsec-optimize src/firecfg src/fnetfilter src/libtrace src/libtracelog src/ftee \
4src/faudit src/fnet src/fseccomp src/fbuilder src/fcopy src/fldd src/libpostexecseccomp src/profstats
4MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-users.5 5MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-users.5
5SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx 6SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx
6 7
diff --git a/README.md b/README.md
index bc2708041..374d6f456 100644
--- a/README.md
+++ b/README.md
@@ -149,6 +149,31 @@ We also keep a list of profile fixes for previous released versions in [etc-fixe
149 149
150## Current development version: 0.9.63 150## Current development version: 0.9.63
151 151
152### Profile Statistics
153
154A small tool to print profile statistics. Compile as usual and run:
155`````
156$ make
157$ cd etc
158$ ./profstats *.profile
159Stats:
160 profiles 925
161 include local profile 925 (include profile-name.local)
162 include globals 925 (include globals.local)
163 blacklist ~/.ssh 910 (include disable-common.inc)
164 seccomp 868
165 capabilities 924
166 noexec 785 (include disable-exec.inc)
167 apparmor 426
168 private-dev 788
169 private-tmp 687
170 whitelist var directory 595 (include whitelist-var-common.inc)
171 net none 274
172`````
173
174Run ./profstats -h for help.
175
152### New profiles: 176### New profiles:
153 177
154gfeeds, firefox-x11, tvbrowser, rtv, clipgrab, gnome-passwordsafe, bibtex, gummi, latex, pdflatex, tex, wpp, wpspdf, wps, et, multimc, gnome-hexgl, com.github.johnfactotum.Foliate, desktopeditors, impressive, mupdf-gl, mupdf-x11, mupdf-x11-curl, muraster, mutool, planmaker18, planmaker18free, presentations18, presentations18free, textmaker18, textmaker18free, teams, xournal 178gfeeds, firefox-x11, tvbrowser, rtv, clipgrab, gnome-passwordsafe, bibtex, gummi, latex, pdflatex, tex, wpp, wpspdf, wps, et, multimc, gnome-hexgl, com.github.johnfactotum.Foliate, desktopeditors, impressive, mupdf-gl, mupdf-x11, mupdf-x11-curl, muraster, mutool, planmaker18, planmaker18free, presentations18, presentations18free, textmaker18, textmaker18free, teams, xournal,
179gnome-screenshot, ripperX, sound-juicer
diff --git a/RELNOTES b/RELNOTES
index df0e3ec85..afd6bdbbd 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -2,13 +2,14 @@ firejail (0.9.63) baseline; urgency=low
2 * work in progress 2 * work in progress
3 * DHCP client support 3 * DHCP client support
4 * SELinux labeling support 4 * SELinux labeling support
5 * new condition: HAS_NOSOUND
5 * new profiles: gfeeds, firefox-x11, tvbrowser, rtv, clipgrab, muraster 6 * new profiles: gfeeds, firefox-x11, tvbrowser, rtv, clipgrab, muraster
6 * new profiles: gnome-passwordsafe, bibtex, gummi, latex, mupdf-x11-curl 7 * new profiles: gnome-passwordsafe, bibtex, gummi, latex, mupdf-x11-curl
7 * new profiles: pdflatex, tex, wpp, wpspdf, wps, et, multimc, mupdf-x11 8 * new profiles: pdflatex, tex, wpp, wpspdf, wps, et, multimc, mupdf-x11
8 * new profiles: gnome-hexgl, com.github.johnfactotum.Foliate, mupdf-gl, mutool 9 * new profiles: gnome-hexgl, com.github.johnfactotum.Foliate, mupdf-gl, mutool
9 * new profiles: desktopeditors, impressive, planmaker18, planmaker18free 10 * new profiles: desktopeditors, impressive, planmaker18, planmaker18free
10 * new profiles: presentations18, presentations18free, textmaker18, teams 11 * new profiles: presentations18, presentations18free, textmaker18, teams
11 * new profiles: textmaker18free, xournal 12 * new profiles: textmaker18free, xournal, gnome-screenshot
12 13
13firejail (0.9.62) baseline; urgency=low 14firejail (0.9.62) baseline; urgency=low
14 * added file-copy-limit in /etc/firejail/firejail.config 15 * added file-copy-limit in /etc/firejail/firejail.config
diff --git a/configure b/configure
index 53ea8f19d..f587bb25e 100755
--- a/configure
+++ b/configure
@@ -683,6 +683,7 @@ infodir
683docdir 683docdir
684oldincludedir 684oldincludedir
685includedir 685includedir
686runstatedir
686localstatedir 687localstatedir
687sharedstatedir 688sharedstatedir
688sysconfdir 689sysconfdir
@@ -776,6 +777,7 @@ datadir='${datarootdir}'
776sysconfdir='${prefix}/etc' 777sysconfdir='${prefix}/etc'
777sharedstatedir='${prefix}/com' 778sharedstatedir='${prefix}/com'
778localstatedir='${prefix}/var' 779localstatedir='${prefix}/var'
780runstatedir='${localstatedir}/run'
779includedir='${prefix}/include' 781includedir='${prefix}/include'
780oldincludedir='/usr/include' 782oldincludedir='/usr/include'
781docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 783docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1028,6 +1030,15 @@ do
1028 | -silent | --silent | --silen | --sile | --sil) 1030 | -silent | --silent | --silen | --sile | --sil)
1029 silent=yes ;; 1031 silent=yes ;;
1030 1032
1033 -runstatedir | --runstatedir | --runstatedi | --runstated \
1034 | --runstate | --runstat | --runsta | --runst | --runs \
1035 | --run | --ru | --r)
1036 ac_prev=runstatedir ;;
1037 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1038 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1039 | --run=* | --ru=* | --r=*)
1040 runstatedir=$ac_optarg ;;
1041
1031 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1042 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1032 ac_prev=sbindir ;; 1043 ac_prev=sbindir ;;
1033 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 1044 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1165,7 +1176,7 @@ fi
1165for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1176for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1166 datadir sysconfdir sharedstatedir localstatedir includedir \ 1177 datadir sysconfdir sharedstatedir localstatedir includedir \
1167 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1178 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1168 libdir localedir mandir 1179 libdir localedir mandir runstatedir
1169do 1180do
1170 eval ac_val=\$$ac_var 1181 eval ac_val=\$$ac_var
1171 # Remove trailing slashes. 1182 # Remove trailing slashes.
@@ -1318,6 +1329,7 @@ Fine tuning of the installation directories:
1318 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1329 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1319 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1330 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1320 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1331 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1332 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1321 --libdir=DIR object code libraries [EPREFIX/lib] 1333 --libdir=DIR object code libraries [EPREFIX/lib]
1322 --includedir=DIR C header files [PREFIX/include] 1334 --includedir=DIR C header files [PREFIX/include]
1323 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1335 --oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -4174,7 +4186,7 @@ if test "$prefix" = /usr; then
4174 test "$sysconfdir" = '${prefix}/etc' && sysconfdir="/etc" 4186 test "$sysconfdir" = '${prefix}/etc' && sysconfdir="/etc"
4175fi 4187fi
4176 4188
4177ac_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" 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"
4178 4190
4179cat >confcache <<\_ACEOF 4191cat >confcache <<\_ACEOF
4180# This file is a shell script that caches the results of configure 4192# This file is a shell script that caches the results of configure
@@ -4902,6 +4914,7 @@ do
4902 "src/fldd/Makefile") CONFIG_FILES="$CONFIG_FILES src/fldd/Makefile" ;; 4914 "src/fldd/Makefile") CONFIG_FILES="$CONFIG_FILES src/fldd/Makefile" ;;
4903 "src/libpostexecseccomp/Makefile") CONFIG_FILES="$CONFIG_FILES src/libpostexecseccomp/Makefile" ;; 4915 "src/libpostexecseccomp/Makefile") CONFIG_FILES="$CONFIG_FILES src/libpostexecseccomp/Makefile" ;;
4904 "src/fsec-optimize/Makefile") CONFIG_FILES="$CONFIG_FILES src/fsec-optimize/Makefile" ;; 4916 "src/fsec-optimize/Makefile") CONFIG_FILES="$CONFIG_FILES src/fsec-optimize/Makefile" ;;
4917 "src/profstats/Makefile") CONFIG_FILES="$CONFIG_FILES src/profstats/Makefile" ;;
4905 4918
4906 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 4919 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
4907 esac 4920 esac
diff --git a/configure.ac b/configure.ac
index 3c9f901cb..8cf170c80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,7 +206,8 @@ fi
206 206
207AC_OUTPUT(Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile \ 207AC_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 \ 208src/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) 209src/ftee/Makefile src/faudit/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile \
210src/profstats/Makefile)
210 211
211echo 212echo
212echo "Configuration options:" 213echo "Configuration options:"
diff --git a/etc/2048-qt.profile b/etc/2048-qt.profile
index 2347039a6..12268706a 100644
--- a/etc/2048-qt.profile
+++ b/etc/2048-qt.profile
@@ -23,8 +23,9 @@ whitelist ${HOME}/.config/xiaoyong
23include whitelist-common.inc 23include whitelist-common.inc
24include whitelist-var-common.inc 24include whitelist-var-common.inc
25 25
26apparmor
26caps.drop all 27caps.drop all
27netfilter 28net none
28nodvd 29nodvd
29nogroups 30nogroups
30nonewprivs 31nonewprivs
diff --git a/etc/Screenshot.profile b/etc/Screenshot.profile
new file mode 100644
index 000000000..d4b083736
--- /dev/null
+++ b/etc/Screenshot.profile
@@ -0,0 +1,6 @@
1# Firejail profile for gnome-screenshot
2# This file is overwritten after every install/update
3
4# Temporary fix for https://github.com/netblue30/firejail/issues/2624
5# Redirect
6include gnome-screenshot.profile
diff --git a/etc/Viber.profile b/etc/Viber.profile
index 925e130de..3195e39fa 100644
--- a/etc/Viber.profile
+++ b/etc/Viber.profile
@@ -6,6 +6,7 @@ include Viber.local
6include globals.local 6include globals.local
7 7
8noblacklist ${HOME}/.ViberPC 8noblacklist ${HOME}/.ViberPC
9noblacklist ${PATH}/dig
9 10
10include disable-common.inc 11include disable-common.inc
11include disable-devel.inc 12include disable-devel.inc
diff --git a/etc/asunder.profile b/etc/asunder.profile
index 1f3acd735..fceac7cf9 100644
--- a/etc/asunder.profile
+++ b/etc/asunder.profile
@@ -20,21 +20,25 @@ include disable-passwdmgr.inc
20include disable-programs.inc 20include disable-programs.inc
21include disable-xdg.inc 21include disable-xdg.inc
22 22
23include whitelist-usr-share-common.inc
23include whitelist-var-common.inc 24include whitelist-var-common.inc
24 25
25apparmor 26apparmor
26caps.drop all 27caps.drop all
27netfilter 28netfilter
29no3d
28nodbus 30nodbus
29# nogroups 31# nogroups
30nonewprivs 32nonewprivs
31noroot 33noroot
32nou2f 34nou2f
35notv
33novideo 36novideo
34protocol unix,inet,inet6 37protocol unix,inet,inet6
35seccomp 38seccomp
36shell none 39shell none
37 40
41private-cache
38private-dev 42private-dev
39private-tmp 43private-tmp
40 44
diff --git a/etc/atool.profile b/etc/atool.profile
index 0250451fc..ff3c81a80 100644
--- a/etc/atool.profile
+++ b/etc/atool.profile
@@ -25,7 +25,6 @@ hostname atool
25ipc-namespace 25ipc-namespace
26machine-id 26machine-id
27net none 27net none
28netfilter
29no3d 28no3d
30nodvd 29nodvd
31nodbus 30nodbus
diff --git a/etc/baobab.profile b/etc/baobab.profile
index 18c862a4d..d87de9d66 100644
--- a/etc/baobab.profile
+++ b/etc/baobab.profile
@@ -29,6 +29,7 @@ novideo
29protocol unix 29protocol unix
30seccomp 30seccomp
31shell none 31shell none
32tracelog
32 33
33private-bin baobab 34private-bin baobab
34private-dev 35private-dev
diff --git a/etc/bluefish.profile b/etc/bluefish.profile
index 412088ba9..a85840d2f 100644
--- a/etc/bluefish.profile
+++ b/etc/bluefish.profile
@@ -15,6 +15,7 @@ include disable-programs.inc
15 15
16include whitelist-var-common.inc 16include whitelist-var-common.inc
17 17
18apparmor
18caps.drop all 19caps.drop all
19net none 20net none
20no3d 21no3d
diff --git a/etc/brasero.profile b/etc/brasero.profile
index 67fc07afb..417a6b3e0 100644
--- a/etc/brasero.profile
+++ b/etc/brasero.profile
@@ -15,6 +15,9 @@ include disable-interpreters.inc
15include disable-passwdmgr.inc 15include disable-passwdmgr.inc
16include disable-programs.inc 16include disable-programs.inc
17 17
18include whitelist-var-common.inc
19
20apparmor
18caps.drop all 21caps.drop all
19net none 22net none
20nogroups 23nogroups
diff --git a/etc/calibre.profile b/etc/calibre.profile
index ad6f0aa0d..d17cfa85f 100644
--- a/etc/calibre.profile
+++ b/etc/calibre.profile
@@ -19,6 +19,7 @@ include disable-xdg.inc
19 19
20include whitelist-var-common.inc 20include whitelist-var-common.inc
21 21
22apparmor
22caps.drop all 23caps.drop all
23netfilter 24netfilter
24nodvd 25nodvd
diff --git a/etc/catfish.profile b/etc/catfish.profile
index c6c2d7e8a..577391c5d 100644
--- a/etc/catfish.profile
+++ b/etc/catfish.profile
@@ -24,6 +24,7 @@ include disable-passwdmgr.inc
24whitelist /var/lib/mlocate 24whitelist /var/lib/mlocate
25include whitelist-var-common.inc 25include whitelist-var-common.inc
26 26
27apparmor
27caps.drop all 28caps.drop all
28net none 29net none
29no3d 30no3d
diff --git a/etc/curl.profile b/etc/curl.profile
index 3f93e5f7e..a720aca9b 100644
--- a/etc/curl.profile
+++ b/etc/curl.profile
@@ -19,7 +19,9 @@ include disable-programs.inc
19#include disable-xdg.inc 19#include disable-xdg.inc
20 20
21include whitelist-usr-share-common.inc 21include whitelist-usr-share-common.inc
22include whitelist-var-common.inc
22 23
24apparmor
23caps.drop all 25caps.drop all
24ipc-namespace 26ipc-namespace
25machine-id 27machine-id
diff --git a/etc/default.profile b/etc/default.profile
index 95a6e8095..7731b6e00 100644
--- a/etc/default.profile
+++ b/etc/default.profile
@@ -16,6 +16,11 @@ include disable-passwdmgr.inc
16include disable-programs.inc 16include disable-programs.inc
17# include disable-xdg.inc 17# include disable-xdg.inc
18 18
19# include whitelist-common.inc
20# include whitelist-usr-share-common.inc
21# include whitelist-runuser-common.inc
22# include whitelist-var-common.inc
23
19# apparmor 24# apparmor
20caps.drop all 25caps.drop all
21# ipc-namespace 26# ipc-namespace
@@ -42,8 +47,11 @@ seccomp
42# private-bin program 47# private-bin program
43# private-cache 48# private-cache
44# private-dev 49# private-dev
45# private-etc alternatives 50# see /usr/share/doc/firejail/profile.template for more common private-etc paths.
51# private-etc alternatives,fonts,machine-id
46# private-lib 52# private-lib
53# private-opt none
47# private-tmp 54# private-tmp
48 55
49# memory-deny-write-execute 56# memory-deny-write-execute
57# read-only ${HOME}
diff --git a/etc/deluge.profile b/etc/deluge.profile
index 8f4f9fbe9..17c5059f5 100644
--- a/etc/deluge.profile
+++ b/etc/deluge.profile
@@ -14,6 +14,7 @@ include allow-python3.inc
14 14
15include disable-common.inc 15include disable-common.inc
16# include disable-devel.inc 16# include disable-devel.inc
17include disable-exec.inc
17include disable-interpreters.inc 18include disable-interpreters.inc
18include disable-passwdmgr.inc 19include disable-passwdmgr.inc
19include disable-programs.inc 20include disable-programs.inc
@@ -24,6 +25,7 @@ whitelist ${HOME}/.config/deluge
24include whitelist-common.inc 25include whitelist-common.inc
25include whitelist-var-common.inc 26include whitelist-var-common.inc
26 27
28apparmor
27caps.drop all 29caps.drop all
28machine-id 30machine-id
29netfilter 31netfilter
diff --git a/etc/dia.profile b/etc/dia.profile
index bd79797b7..3a8651e2e 100644
--- a/etc/dia.profile
+++ b/etc/dia.profile
@@ -19,6 +19,9 @@ include disable-passwdmgr.inc
19include disable-programs.inc 19include disable-programs.inc
20include disable-xdg.inc 20include disable-xdg.inc
21 21
22include whitelist-var-common.inc
23
24apparmor
22caps.drop all 25caps.drop all
23net none 26net none
24no3d 27no3d
diff --git a/etc/dig.profile b/etc/dig.profile
index 054e4891d..e6b7e46d9 100644
--- a/etc/dig.profile
+++ b/etc/dig.profile
@@ -8,6 +8,7 @@ include dig.local
8include globals.local 8include globals.local
9 9
10noblacklist ${HOME}/.digrc 10noblacklist ${HOME}/.digrc
11noblacklist ${PATH}/dig
11 12
12blacklist /tmp/.X11-unix 13blacklist /tmp/.X11-unix
13 14
@@ -25,6 +26,7 @@ include whitelist-common.inc
25include whitelist-usr-share-common.inc 26include whitelist-usr-share-common.inc
26include whitelist-var-common.inc 27include whitelist-var-common.inc
27 28
29apparmor
28caps.drop all 30caps.drop all
29ipc-namespace 31ipc-namespace
30machine-id 32machine-id
@@ -47,7 +49,6 @@ tracelog
47disable-mnt 49disable-mnt
48private 50private
49private-bin bash,dig,sh 51private-bin bash,dig,sh
50private-cache
51private-dev 52private-dev
52# Uncomment the next line (or put 'private-lib' in your dig.local) on non Debian/Ubuntu OS (see issue #3038) 53# Uncomment the next line (or put 'private-lib' in your dig.local) on non Debian/Ubuntu OS (see issue #3038)
53#private-lib 54#private-lib
diff --git a/etc/disable-common.inc b/etc/disable-common.inc
index bf29cd137..815e4b13d 100644
--- a/etc/disable-common.inc
+++ b/etc/disable-common.inc
@@ -444,7 +444,14 @@ blacklist /.snapshots
444 444
445# flatpak 445# flatpak
446blacklist ${HOME}/.config/flatpak 446blacklist ${HOME}/.config/flatpak
447blacklist ${HOME}/.local/share/flatpak 447blacklist ${HOME}/.local/share/flatpak/app
448blacklist ${HOME}/.local/share/flatpak/appstream
449blacklist ${HOME}/.local/share/flatpak/db
450read-only ${HOME}/.local/share/flatpak/exports
451blacklist ${HOME}/.local/share/flatpak/oci
452blacklist ${HOME}/.local/share/flatpak/overrides
453blacklist ${HOME}/.local/share/flatpak/repo
454blacklist ${HOME}/.local/share/flatpak/runtime
448blacklist ${HOME}/.var 455blacklist ${HOME}/.var
449blacklist /usr/share/flatpak 456blacklist /usr/share/flatpak
450blacklist /var/lib/flatpak 457blacklist /var/lib/flatpak
@@ -462,3 +469,16 @@ blacklist ${HOME}/sent
462 469
463# kernel configuration 470# kernel configuration
464blacklist /proc/config.gz 471blacklist /proc/config.gz
472
473# prevent DNS malware attempting to communicate with the server
474# using regular DNS tools
475blacklist ${PATH}/dig
476blacklist ${PATH}/kdig
477blacklist ${PATH}/nslookup
478blacklist ${PATH}/host
479blacklist ${PATH}/dlint
480blacklist ${PATH}/dnswalk
481blacklist ${PATH}/dns2tcp
482blacklist ${PATH}/iodine
483blacklist ${PATH}/knsupdate
484blacklist ${PATH}/resolvectl
diff --git a/etc/disable-devel.inc b/etc/disable-devel.inc
index 59df9fb0f..e1ba13380 100644
--- a/etc/disable-devel.inc
+++ b/etc/disable-devel.inc
@@ -26,7 +26,6 @@ blacklist ${PATH}/*-gcc*
26blacklist ${PATH}/*-g++* 26blacklist ${PATH}/*-g++*
27blacklist ${PATH}/*-gcc* 27blacklist ${PATH}/*-gcc*
28blacklist ${PATH}/*-g++* 28blacklist ${PATH}/*-g++*
29blacklist /usr/include
30# seems to create problems on Gentoo 29# seems to create problems on Gentoo
31#blacklist /usr/lib/gcc 30#blacklist /usr/lib/gcc
32 31
diff --git a/etc/disable-programs.inc b/etc/disable-programs.inc
index db257c1b6..b54c1cce3 100644
--- a/etc/disable-programs.inc
+++ b/etc/disable-programs.inc
@@ -305,6 +305,7 @@ blacklist ${HOME}/.config/slimjet
305blacklist ${HOME}/.config/smplayer 305blacklist ${HOME}/.config/smplayer
306blacklist ${HOME}/.config/smtube 306blacklist ${HOME}/.config/smtube
307blacklist ${HOME}/.config/snox 307blacklist ${HOME}/.config/snox
308blacklist ${HOME}/.config/sound-juicer
308blacklist ${HOME}/.config/specialmailcollectionsrc 309blacklist ${HOME}/.config/specialmailcollectionsrc
309blacklist ${HOME}/.config/spotify 310blacklist ${HOME}/.config/spotify
310blacklist ${HOME}/.config/sqlitebrowser 311blacklist ${HOME}/.config/sqlitebrowser
@@ -650,6 +651,7 @@ blacklist ${HOME}/.remmina
650blacklist ${HOME}/.repo_.gitconfig.json 651blacklist ${HOME}/.repo_.gitconfig.json
651blacklist ${HOME}/.repoconfig 652blacklist ${HOME}/.repoconfig
652blacklist ${HOME}/.retroshare 653blacklist ${HOME}/.retroshare
654blacklist ${HOME}/.ripperXrc
653blacklist ${HOME}/.scorched3d 655blacklist ${HOME}/.scorched3d
654blacklist ${HOME}/.scribus 656blacklist ${HOME}/.scribus
655blacklist ${HOME}/.scribusrc 657blacklist ${HOME}/.scribusrc
@@ -759,6 +761,7 @@ blacklist ${HOME}/.cache/gfeeds
759blacklist ${HOME}/.cache/gimp 761blacklist ${HOME}/.cache/gimp
760blacklist ${HOME}/.cache/gnome-builder 762blacklist ${HOME}/.cache/gnome-builder
761blacklist ${HOME}/.cache/gnome-recipes 763blacklist ${HOME}/.cache/gnome-recipes
764blacklist ${HOME}/.cache/gnome-screenshot
762blacklist ${HOME}/.cache/gnome-twitch 765blacklist ${HOME}/.cache/gnome-twitch
763blacklist ${HOME}/.cache/godot 766blacklist ${HOME}/.cache/godot
764blacklist ${HOME}/.cache/google-chrome 767blacklist ${HOME}/.cache/google-chrome
diff --git a/etc/discord-common.profile b/etc/discord-common.profile
index a6e730937..43e8d5cd7 100644
--- a/etc/discord-common.profile
+++ b/etc/discord-common.profile
@@ -6,8 +6,11 @@ include discord-common.local
6# added by caller profile 6# added by caller profile
7#include globals.local 7#include globals.local
8 8
9ignore noexec ${HOME}
10
9include disable-common.inc 11include disable-common.inc
10include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc
11include disable-passwdmgr.inc 14include disable-passwdmgr.inc
12include disable-programs.inc 15include disable-programs.inc
13 16
@@ -25,11 +28,9 @@ notv
25nou2f 28nou2f
26novideo 29novideo
27protocol unix,inet,inet6,netlink 30protocol unix,inet,inet6,netlink
28seccomp 31seccomp !chroot
29 32
30private-bin bash,cut,echo,egrep,grep,head,sed,sh,tr,xdg-mime,xdg-open,zsh 33private-bin bash,cut,echo,egrep,grep,head,sed,sh,tclsh,tr,xdg-mime,xdg-open,zsh
31private-dev 34private-dev
32private-etc alternatives,ca-certificates,crypto-policies,fonts,group,ld.so.cache,localtime,login.defs,machine-id,password,pki,resolv.conf,ssl 35private-etc alternatives,ca-certificates,crypto-policies,fonts,group,ld.so.cache,localtime,login.defs,machine-id,password,pki,resolv.conf,ssl
33private-tmp 36private-tmp
34
35noexec /tmp
diff --git a/etc/fbreader.profile b/etc/fbreader.profile
index 701f14dce..af670cee2 100644
--- a/etc/fbreader.profile
+++ b/etc/fbreader.profile
@@ -11,6 +11,7 @@ noblacklist ${DOCUMENTS}
11 11
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc
14include disable-interpreters.inc 15include disable-interpreters.inc
15include disable-passwdmgr.inc 16include disable-passwdmgr.inc
16include disable-programs.inc 17include disable-programs.inc
@@ -18,8 +19,9 @@ include disable-xdg.inc
18 19
19include whitelist-var-common.inc 20include whitelist-var-common.inc
20 21
22apparmor
21caps.drop all 23caps.drop all
22netfilter 24net none
23nodvd 25nodvd
24nonewprivs 26nonewprivs
25noroot 27noroot
diff --git a/etc/file-roller.profile b/etc/file-roller.profile
index 253b82cfe..9d84f07de 100644
--- a/etc/file-roller.profile
+++ b/etc/file-roller.profile
@@ -36,7 +36,7 @@ seccomp
36shell none 36shell none
37tracelog 37tracelog
38 38
39private-bin 7z,7za,7zr,ar,arj,brotli,bzip2,compress,cpio,dpkg-deb,file-roller,gtar,gzip,isoinfo,lha,lrzip,lsar,lz4,lzip,lzma,lzop,rar,rzip,tar,unace,unalz,unar,uncompress,unrar,unsquashfs,unstuff,unzip,xz,zip,zoo 39private-bin 7z,7za,7zr,ar,arj,bash,brotli,bzip2,compress,cpio,dpkg-deb,file-roller,gtar,gzip,isoinfo,lha,lrzip,lsar,lz4,lzip,lzma,lzop,p7zip,rar,rzip,sh,tar,unace,unalz,unar,uncompress,unrar,unsquashfs,unstuff,unzip,xz,zip,zoo
40private-cache 40private-cache
41private-dev 41private-dev
42private-etc dconf,fonts,gtk-3.0,xdg 42private-etc dconf,fonts,gtk-3.0,xdg
diff --git a/etc/file.profile b/etc/file.profile
index 9b21818f8..82b161d48 100644
--- a/etc/file.profile
+++ b/etc/file.profile
@@ -38,8 +38,8 @@ x11 none
38#private-bin bzip2,file,gzip,lrzip,lz4,lzip,xz,zstd 38#private-bin bzip2,file,gzip,lrzip,lz4,lzip,xz,zstd
39private-cache 39private-cache
40private-dev 40private-dev
41private-etc alternatives,localtime,magic,magic.mgc 41#private-etc alternatives,localtime,magic,magic.mgc
42private-lib file,libarchive.so.*,libfakeroot,libmagic.so.* 42#private-lib file,libarchive.so.*,libfakeroot,libmagic.so.*,libseccomp.so.*
43 43
44memory-deny-write-execute 44memory-deny-write-execute
45read-only ${HOME} 45read-only ${HOME}
diff --git a/etc/firejail-default b/etc/firejail-default
index 763b838d3..e68e51c63 100644
--- a/etc/firejail-default
+++ b/etc/firejail-default
@@ -65,6 +65,8 @@ owner /proc/@{PID}/{uid_map,gid_map,setgroups} w,
65 65
66# Needed for electron apps 66# Needed for electron apps
67/proc/@{PID}/comm w, 67/proc/@{PID}/comm w,
68# Needed for nslookup, dig, host
69/proc/@{PID}/task/@{PID}/comm w,
68 70
69# Used by chromium 71# Used by chromium
70owner /proc/@{PID}/oom_score_adj w, 72owner /proc/@{PID}/oom_score_adj w,
diff --git a/etc/freeciv.profile b/etc/freeciv.profile
index fa115d325..379c5eca9 100644
--- a/etc/freeciv.profile
+++ b/etc/freeciv.profile
@@ -21,6 +21,7 @@ whitelist ${HOME}/.freeciv
21include whitelist-common.inc 21include whitelist-common.inc
22include whitelist-var-common.inc 22include whitelist-var-common.inc
23 23
24apparmor
24caps.drop all 25caps.drop all
25ipc-namespace 26ipc-namespace
26netfilter 27netfilter
diff --git a/etc/freeoffice-planmaker.profile b/etc/freeoffice-planmaker.profile
index b6ca167eb..9449e7c48 100644
--- a/etc/freeoffice-planmaker.profile
+++ b/etc/freeoffice-planmaker.profile
@@ -7,4 +7,4 @@ include freeoffice-planmaker.local
7include globals.local 7include globals.local
8 8
9# Redirect 9# Redirect
10include softmaker-common.profile 10include softmaker-common.inc
diff --git a/etc/freeoffice-presentations.profile b/etc/freeoffice-presentations.profile
index 43661028c..636868e2e 100644
--- a/etc/freeoffice-presentations.profile
+++ b/etc/freeoffice-presentations.profile
@@ -7,4 +7,4 @@ include freeoffice-presentations.local
7include globals.local 7include globals.local
8 8
9# Redirect 9# Redirect
10include softmaker-common.profile 10include softmaker-common.inc
diff --git a/etc/freeoffice-textmaker.profile b/etc/freeoffice-textmaker.profile
index f7d30eaed..5d98d1cc6 100644
--- a/etc/freeoffice-textmaker.profile
+++ b/etc/freeoffice-textmaker.profile
@@ -6,4 +6,4 @@ include freeoffice-textmaker.local
6include globals.local 6include globals.local
7 7
8# Redirect 8# Redirect
9include softmaker-common.profile 9include softmaker-common.inc
diff --git a/etc/frozen-bubble.profile b/etc/frozen-bubble.profile
index 6cef181c8..c089d2e35 100644
--- a/etc/frozen-bubble.profile
+++ b/etc/frozen-bubble.profile
@@ -13,6 +13,7 @@ include allow-perl.inc
13 13
14include disable-common.inc 14include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc
16include disable-interpreters.inc 17include disable-interpreters.inc
17include disable-passwdmgr.inc 18include disable-passwdmgr.inc
18include disable-programs.inc 19include disable-programs.inc
@@ -22,6 +23,7 @@ whitelist ${HOME}/.frozen-bubble
22include whitelist-common.inc 23include whitelist-common.inc
23include whitelist-var-common.inc 24include whitelist-var-common.inc
24 25
26apparmor
25caps.drop all 27caps.drop all
26net none 28net none
27nodbus 29nodbus
diff --git a/etc/gitg.profile b/etc/gitg.profile
index 56f8e136f..3c6f9d72f 100644
--- a/etc/gitg.profile
+++ b/etc/gitg.profile
@@ -19,6 +19,14 @@ include disable-interpreters.inc
19include disable-passwdmgr.inc 19include disable-passwdmgr.inc
20include disable-programs.inc 20include disable-programs.inc
21 21
22#whitelist ${HOME}/YOUR_GIT_PROJECTS_DIRECTORY
23#whitelist ${HOME}/.config/git
24#whitelist ${HOME}/.gitconfig
25#whitelist ${HOME}/.git-credentials
26#whitelist ${HOME}/.local/share/gitg
27#whitelist ${HOME}/.ssh
28#include whitelist-common.inc
29
22whitelist /usr/share/gitg 30whitelist /usr/share/gitg
23include whitelist-usr-share-common.inc 31include whitelist-usr-share-common.inc
24include whitelist-var-common.inc 32include whitelist-var-common.inc
diff --git a/etc/gnome-maps.profile b/etc/gnome-maps.profile
index 62350b862..12415a937 100644
--- a/etc/gnome-maps.profile
+++ b/etc/gnome-maps.profile
@@ -13,7 +13,6 @@ include globals.local
13 13
14noblacklist ${HOME}/.cache/champlain 14noblacklist ${HOME}/.cache/champlain
15noblacklist ${HOME}/.cache/org.gnome.Maps 15noblacklist ${HOME}/.cache/org.gnome.Maps
16noblacklist ${HOME}/.local/share/flatpak
17noblacklist ${HOME}/.local/share/maps-places.json 16noblacklist ${HOME}/.local/share/maps-places.json
18 17
19# Allow gjs (blacklisted by disable-interpreters.inc) 18# Allow gjs (blacklisted by disable-interpreters.inc)
diff --git a/etc/gnome-screenshot.profile b/etc/gnome-screenshot.profile
new file mode 100644
index 000000000..c00aefdb7
--- /dev/null
+++ b/etc/gnome-screenshot.profile
@@ -0,0 +1,47 @@
1# Firejail profile for gnome-screenshot
2# Description: GNOME screenshot tool
3# This file is overwritten after every install/update
4# Persistent local customizations
5include gnome-screenshot.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${PICTURES}
10noblacklist ${HOME}/.cache/gnome-screenshot
11
12include disable-common.inc
13include disable-devel.inc
14include disable-exec.inc
15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc
18include disable-xdg.inc
19
20whitelist ${RUNUSER}/bus
21whitelist ${RUNUSER}/pulse
22whitelist ${RUNUSER}/gdm/Xauthority
23whitelist ${RUNUSER}/wayland-0
24include whitelist-usr-share-common.inc
25include whitelist-var-common.inc
26
27apparmor
28caps.drop all
29net none
30no3d
31nodvd
32nogroups
33nonewprivs
34noroot
35notv
36nou2f
37novideo
38protocol unix
39seccomp
40shell none
41tracelog
42
43disable-mnt
44private-bin gnome-screenshot
45private-dev
46private-etc dconf,fonts,gtk-3.0,localtime,machine-id
47private-tmp
diff --git a/etc/gnome-sound-recorder.profile b/etc/gnome-sound-recorder.profile
index 7f8fc8a0c..a64ec25a9 100644
--- a/etc/gnome-sound-recorder.profile
+++ b/etc/gnome-sound-recorder.profile
@@ -7,7 +7,6 @@ include gnome-sound-recorder.local
7include globals.local 7include globals.local
8 8
9noblacklist ${MUSIC} 9noblacklist ${MUSIC}
10noblacklist ${HOME}/.local/share/flatpak
11noblacklist ${HOME}/.local/share/Trash 10noblacklist ${HOME}/.local/share/Trash
12 11
13# Allow gjs (blacklisted by disable-interpreters.inc) 12# Allow gjs (blacklisted by disable-interpreters.inc)
diff --git a/etc/handbrake.profile b/etc/handbrake.profile
index 324c629e3..add3f407c 100644
--- a/etc/handbrake.profile
+++ b/etc/handbrake.profile
@@ -22,7 +22,7 @@ include whitelist-var-common.inc
22 22
23apparmor 23apparmor
24caps.drop all 24caps.drop all
25netfilter 25net none
26nodbus 26nodbus
27nogroups 27nogroups
28nonewprivs 28nonewprivs
diff --git a/etc/host.profile b/etc/host.profile
new file mode 100644
index 000000000..51b372361
--- /dev/null
+++ b/etc/host.profile
@@ -0,0 +1,49 @@
1# Firejail profile for host
2# Description: DNS lookup utility
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include host.local
7# Persistent global definitions
8include globals.local
9
10noblacklist ${PATH}/host
11
12include disable-common.inc
13include disable-devel.inc
14include disable-exec.inc
15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc
18include disable-xdg.inc
19
20include whitelist-usr-share-common.inc
21include whitelist-var-common.inc
22
23apparmor
24caps.drop all
25ipc-namespace
26machine-id
27netfilter
28no3d
29nodbus
30nodvd
31nogroups
32nonewprivs
33noroot
34nosound
35notv
36nou2f
37novideo
38protocol unix,inet,inet6
39seccomp
40shell none
41tracelog
42
43disable-mnt
44private
45private-bin bash,host,sh
46private-dev
47private-tmp
48
49memory-deny-write-execute
diff --git a/etc/kino.profile b/etc/kino.profile
index 9e8d61391..b3ade0dd9 100644
--- a/etc/kino.profile
+++ b/etc/kino.profile
@@ -16,6 +16,9 @@ include disable-interpreters.inc
16include disable-passwdmgr.inc 16include disable-passwdmgr.inc
17include disable-programs.inc 17include disable-programs.inc
18 18
19include whitelist-var-common.inc
20
21apparmor
19caps.drop all 22caps.drop all
20netfilter 23netfilter
21nogroups 24nogroups
diff --git a/etc/leafpad.profile b/etc/leafpad.profile
index 56a792c8e..c456541aa 100644
--- a/etc/leafpad.profile
+++ b/etc/leafpad.profile
@@ -17,8 +17,9 @@ include disable-programs.inc
17 17
18include whitelist-var-common.inc 18include whitelist-var-common.inc
19 19
20apparmor
20caps.drop all 21caps.drop all
21netfilter 22net none
22no3d 23no3d
23nodvd 24nodvd
24nogroups 25nogroups
diff --git a/etc/lincity-ng.profile b/etc/lincity-ng.profile
index b55ac9a15..748d38221 100644
--- a/etc/lincity-ng.profile
+++ b/etc/lincity-ng.profile
@@ -21,6 +21,7 @@ whitelist ${HOME}/.lincity-ng
21include whitelist-common.inc 21include whitelist-common.inc
22include whitelist-var-common.inc 22include whitelist-var-common.inc
23 23
24apparmor
24caps.drop all 25caps.drop all
25ipc-namespace 26ipc-namespace
26net none 27net none
diff --git a/etc/lrzuntar.profile b/etc/lrzuntar.profile
index 245d1c669..17215a5d7 100644
--- a/etc/lrzuntar.profile
+++ b/etc/lrzuntar.profile
@@ -7,6 +7,7 @@ include lrzuntar.local
7# Persistent global definitions 7# Persistent global definitions
8# added by included profile 8# added by included profile
9#include globals.local 9#include globals.local
10quiet
10 11
11# Redirect 12# Redirect
12include cpio.profile 13include cpio.profile
diff --git a/etc/lximage-qt.profile b/etc/lximage-qt.profile
index 74adb7a67..a33ddab78 100644
--- a/etc/lximage-qt.profile
+++ b/etc/lximage-qt.profile
@@ -14,9 +14,11 @@ include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc 15include disable-passwdmgr.inc
16include disable-programs.inc 16include disable-programs.inc
17include whitelist-var-common.inc
17 18
19apparmor
18caps.drop all 20caps.drop all
19netfilter 21net none
20no3d 22no3d
21nodvd 23nodvd
22nogroups 24nogroups
diff --git a/etc/lxmusic.profile b/etc/lxmusic.profile
index e1a37343e..9094f4377 100644
--- a/etc/lxmusic.profile
+++ b/etc/lxmusic.profile
@@ -20,6 +20,7 @@ include disable-xdg.inc
20 20
21include whitelist-var-common.inc 21include whitelist-var-common.inc
22 22
23apparmor
23caps.drop all 24caps.drop all
24netfilter 25netfilter
25no3d 26no3d
diff --git a/etc/lzcat.profile b/etc/lzcat.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzcat.profile
+++ b/etc/lzcat.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/lzcmp.profile b/etc/lzcmp.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzcmp.profile
+++ b/etc/lzcmp.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/lzegrep.profile b/etc/lzegrep.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzegrep.profile
+++ b/etc/lzegrep.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/lzfgrep.profile b/etc/lzfgrep.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzfgrep.profile
+++ b/etc/lzfgrep.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/lzgrep.profile b/etc/lzgrep.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzgrep.profile
+++ b/etc/lzgrep.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/lzip.profile b/etc/lzip.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzip.profile
+++ b/etc/lzip.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/lzless.profile b/etc/lzless.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzless.profile
+++ b/etc/lzless.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/lzma.profile b/etc/lzma.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzma.profile
+++ b/etc/lzma.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/lzmainfo.profile b/etc/lzmainfo.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzmainfo.profile
+++ b/etc/lzmainfo.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/lzmore.profile b/etc/lzmore.profile
index f7410b928..d9c72407f 100644
--- a/etc/lzmore.profile
+++ b/etc/lzmore.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/mate-calc.profile b/etc/mate-calc.profile
index 2f6020ad3..8bd62ae0b 100644
--- a/etc/mate-calc.profile
+++ b/etc/mate-calc.profile
@@ -22,7 +22,9 @@ whitelist ${HOME}/.cache/mate-calc
22whitelist ${HOME}/.config/caja 22whitelist ${HOME}/.config/caja
23whitelist ${HOME}/.config/mate-menu 23whitelist ${HOME}/.config/mate-menu
24include whitelist-common.inc 24include whitelist-common.inc
25include whitelist-var-common.inc
25 26
27apparmor
26caps.drop all 28caps.drop all
27net none 29net none
28no3d 30no3d
diff --git a/etc/mate-dictionary.profile b/etc/mate-dictionary.profile
index 49a776766..59f439c91 100644
--- a/etc/mate-dictionary.profile
+++ b/etc/mate-dictionary.profile
@@ -18,6 +18,7 @@ mkdir ${HOME}/.config/mate/mate-dictionary
18whitelist ${HOME}/.config/mate/mate-dictionary 18whitelist ${HOME}/.config/mate/mate-dictionary
19include whitelist-common.inc 19include whitelist-common.inc
20 20
21apparmor
21caps.drop all 22caps.drop all
22netfilter 23netfilter
23no3d 24no3d
diff --git a/etc/midori.profile b/etc/midori.profile
index e11e2acaa..e15259608 100644
--- a/etc/midori.profile
+++ b/etc/midori.profile
@@ -48,7 +48,9 @@ whitelist ${HOME}/.local/share/webkitgtk
48whitelist ${HOME}/.pki 48whitelist ${HOME}/.pki
49whitelist ${HOME}/.local/share/pki 49whitelist ${HOME}/.local/share/pki
50include whitelist-common.inc 50include whitelist-common.inc
51include whitelist-var-common.inc
51 52
53apparmor
52caps.drop all 54caps.drop all
53netfilter 55netfilter
54nodvd 56nodvd
@@ -60,3 +62,4 @@ seccomp
60tracelog 62tracelog
61 63
62disable-mnt 64disable-mnt
65private-tmp
diff --git a/etc/mousepad.profile b/etc/mousepad.profile
index 20370a5b5..868313c40 100644
--- a/etc/mousepad.profile
+++ b/etc/mousepad.profile
@@ -17,8 +17,9 @@ include disable-programs.inc
17 17
18include whitelist-var-common.inc 18include whitelist-var-common.inc
19 19
20apparmor
20caps.drop all 21caps.drop all
21netfilter 22net none
22nodvd 23nodvd
23nogroups 24nogroups
24nonewprivs 25nonewprivs
diff --git a/etc/mplayer.profile b/etc/mplayer.profile
index 9ab4f8c7f..cd25d6c0b 100644
--- a/etc/mplayer.profile
+++ b/etc/mplayer.profile
@@ -21,7 +21,9 @@ include disable-xdg.inc
21include whitelist-usr-share-common.inc 21include whitelist-usr-share-common.inc
22include whitelist-var-common.inc 22include whitelist-var-common.inc
23 23
24apparmor
24caps.drop all 25caps.drop all
26# net none - mplayer can be used for streaming.
25netfilter 27netfilter
26# nogroups 28# nogroups
27nonewprivs 29nonewprivs
diff --git a/etc/mupdf.profile b/etc/mupdf.profile
index 43afbc859..592467658 100644
--- a/etc/mupdf.profile
+++ b/etc/mupdf.profile
@@ -18,6 +18,7 @@ include disable-xdg.inc
18 18
19include whitelist-var-common.inc 19include whitelist-var-common.inc
20 20
21apparmor
21caps.drop all 22caps.drop all
22machine-id 23machine-id
23net none 24net none
diff --git a/etc/musescore.profile b/etc/musescore.profile
index b3693c956..679e82ae8 100644
--- a/etc/musescore.profile
+++ b/etc/musescore.profile
@@ -23,6 +23,7 @@ include disable-xdg.inc
23 23
24include whitelist-var-common.inc 24include whitelist-var-common.inc
25 25
26apparmor
26caps.drop all 27caps.drop all
27netfilter 28netfilter
28no3d 29no3d
diff --git a/etc/nslookup.profile b/etc/nslookup.profile
new file mode 100644
index 000000000..40cb3b6d8
--- /dev/null
+++ b/etc/nslookup.profile
@@ -0,0 +1,49 @@
1# Firejail profile for nslookup
2# Description: DNS lookup utility
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include nslookup.local
7# Persistent global definitions
8include globals.local
9
10noblacklist ${PATH}/nslookup
11
12include disable-common.inc
13include disable-devel.inc
14include disable-exec.inc
15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc
18include disable-xdg.inc
19
20include whitelist-usr-share-common.inc
21include whitelist-var-common.inc
22
23apparmor
24caps.drop all
25ipc-namespace
26machine-id
27netfilter
28no3d
29nodbus
30nodvd
31nogroups
32nonewprivs
33noroot
34nosound
35notv
36nou2f
37novideo
38protocol unix,inet,inet6
39seccomp
40shell none
41tracelog
42
43disable-mnt
44private
45private-bin bash,nslookup,sh
46private-dev
47private-tmp
48
49memory-deny-write-execute
diff --git a/etc/open-invaders.profile b/etc/open-invaders.profile
index 5925ccc09..0ba9451d8 100644
--- a/etc/open-invaders.profile
+++ b/etc/open-invaders.profile
@@ -10,6 +10,7 @@ noblacklist ${HOME}/.openinvaders
10 10
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc
13include disable-interpreters.inc 14include disable-interpreters.inc
14include disable-passwdmgr.inc 15include disable-passwdmgr.inc
15include disable-programs.inc 16include disable-programs.inc
@@ -17,7 +18,9 @@ include disable-programs.inc
17mkdir ${HOME}/.openinvaders 18mkdir ${HOME}/.openinvaders
18whitelist ${HOME}/.openinvaders 19whitelist ${HOME}/.openinvaders
19include whitelist-common.inc 20include whitelist-common.inc
21include whitelist-var-common.inc
20 22
23apparmor
21caps.drop all 24caps.drop all
22net none 25net none
23nodbus 26nodbus
diff --git a/etc/opencity.profile b/etc/opencity.profile
index 6a27c8095..b0192c947 100644
--- a/etc/opencity.profile
+++ b/etc/opencity.profile
@@ -21,6 +21,7 @@ whitelist ${HOME}/.opencity
21include whitelist-common.inc 21include whitelist-common.inc
22include whitelist-var-common.inc 22include whitelist-var-common.inc
23 23
24apparmor
24caps.drop all 25caps.drop all
25ipc-namespace 26ipc-namespace
26net none 27net none
diff --git a/etc/openclonk.profile b/etc/openclonk.profile
index da60006b3..20b2a9626 100644
--- a/etc/openclonk.profile
+++ b/etc/openclonk.profile
@@ -21,9 +21,11 @@ whitelist ${HOME}/.clonk
21include whitelist-common.inc 21include whitelist-common.inc
22include whitelist-var-common.inc 22include whitelist-var-common.inc
23 23
24apparmor
24caps.drop all 25caps.drop all
25ipc-namespace 26ipc-namespace
26net none 27# net none - networked game
28netfilter
27nodbus 29nodbus
28nodvd 30nodvd
29nogroups 31nogroups
diff --git a/etc/openttd.profile b/etc/openttd.profile
index 5de4d325d..10f2f39c3 100644
--- a/etc/openttd.profile
+++ b/etc/openttd.profile
@@ -21,9 +21,10 @@ whitelist ${HOME}/.openttd
21include whitelist-common.inc 21include whitelist-common.inc
22include whitelist-var-common.inc 22include whitelist-var-common.inc
23 23
24apparmor
24caps.drop all 25caps.drop all
25ipc-namespace 26ipc-namespace
26netfilter 27net none
27nodbus 28nodbus
28nodvd 29nodvd
29nogroups 30nogroups
diff --git a/etc/ping.profile b/etc/ping.profile
index 5f68ee011..75ad0ee31 100644
--- a/etc/ping.profile
+++ b/etc/ping.profile
@@ -19,6 +19,7 @@ include whitelist-common.inc
19include whitelist-usr-share-common.inc 19include whitelist-usr-share-common.inc
20include whitelist-var-common.inc 20include whitelist-var-common.inc
21 21
22apparmor
22caps.keep net_raw 23caps.keep net_raw
23ipc-namespace 24ipc-namespace
24#net tun0 25#net tun0
diff --git a/etc/pingus.profile b/etc/pingus.profile
index a3adc55a2..8e77a26d0 100644
--- a/etc/pingus.profile
+++ b/etc/pingus.profile
@@ -10,6 +10,7 @@ noblacklist ${HOME}/.pingus
10 10
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc
13include disable-interpreters.inc 14include disable-interpreters.inc
14include disable-passwdmgr.inc 15include disable-passwdmgr.inc
15include disable-programs.inc 16include disable-programs.inc
@@ -17,7 +18,9 @@ include disable-programs.inc
17mkdir ${HOME}/.pingus 18mkdir ${HOME}/.pingus
18whitelist ${HOME}/.pingus 19whitelist ${HOME}/.pingus
19include whitelist-common.inc 20include whitelist-common.inc
21include whitelist-var-common.inc
20 22
23apparmor
21caps.drop all 24caps.drop all
22net none 25net none
23nodbus 26nodbus
diff --git a/etc/planmaker18.profile b/etc/planmaker18.profile
index 4cf1efb7f..2ba8e86c0 100644
--- a/etc/planmaker18.profile
+++ b/etc/planmaker18.profile
@@ -7,4 +7,4 @@ include planmaker18.local
7include globals.local 7include globals.local
8 8
9# Redirect 9# Redirect
10include softmaker-common.profile 10include softmaker-common.inc
diff --git a/etc/planmaker18free.profile b/etc/planmaker18free.profile
index bb85f1fc7..d0bce44f5 100644
--- a/etc/planmaker18free.profile
+++ b/etc/planmaker18free.profile
@@ -7,4 +7,4 @@ include planmaker18free.local
7include globals.local 7include globals.local
8 8
9# Redirect 9# Redirect
10include softmaker-common.profile 10include softmaker-common.inc
diff --git a/etc/ppsspp.profile b/etc/ppsspp.profile
index 970290002..0b5da661a 100644
--- a/etc/ppsspp.profile
+++ b/etc/ppsspp.profile
@@ -21,7 +21,6 @@ include whitelist-var-common.inc
21 21
22caps.drop all 22caps.drop all
23ipc-namespace 23ipc-namespace
24netfilter
25net none 24net none
26nodbus 25nodbus
27nodvd 26nodvd
diff --git a/etc/presentations18.profile b/etc/presentations18.profile
index ac844d1af..d4f531060 100644
--- a/etc/presentations18.profile
+++ b/etc/presentations18.profile
@@ -7,4 +7,5 @@ include presentations18.local
7include globals.local 7include globals.local
8 8
9# Redirect 9# Redirect
10include softmaker-common.profile 10include softmaker-common.inc
11
diff --git a/etc/presentations18free.profile b/etc/presentations18free.profile
index 218747224..e2319f13f 100644
--- a/etc/presentations18free.profile
+++ b/etc/presentations18free.profile
@@ -7,4 +7,4 @@ include presentations18free.local
7include globals.local 7include globals.local
8 8
9# Redirect 9# Redirect
10include softmaker-common.profile 10include softmaker-common.inc
diff --git a/etc/qpdfview.profile b/etc/qpdfview.profile
index 863f57ba4..dace1634f 100644
--- a/etc/qpdfview.profile
+++ b/etc/qpdfview.profile
@@ -20,6 +20,7 @@ include disable-xdg.inc
20 20
21include whitelist-var-common.inc 21include whitelist-var-common.inc
22 22
23apparmor
23caps.drop all 24caps.drop all
24machine-id 25machine-id
25# needs D-Bus when started from a file manager 26# needs D-Bus when started from a file manager
diff --git a/etc/ripperx.profile b/etc/ripperx.profile
new file mode 100644
index 000000000..b572aa1b4
--- /dev/null
+++ b/etc/ripperx.profile
@@ -0,0 +1,41 @@
1# Firejail profile for mpv
2# Description: Graphical audio CD ripper and encoder
3# This file is overwritten after every install/update
4# Persistent local customizations
5include ripperx.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.ripperXrc
10noblacklist ${MUSIC}
11
12include disable-common.inc
13include disable-devel.inc
14include disable-exec.inc
15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc
18include disable-xdg.inc
19
20include whitelist-usr-share-common.inc
21include whitelist-var-common.inc
22
23apparmor
24caps.drop all
25netfilter
26no3d
27nodbus
28nogroups
29nonewprivs
30noroot
31nou2f
32notv
33novideo
34protocol unix,inet,inet6
35seccomp
36shell none
37tracelog
38
39private-cache
40private-dev
41private-tmp
diff --git a/etc/scribus.profile b/etc/scribus.profile
index e20cd1b5a..e7faccea1 100644
--- a/etc/scribus.profile
+++ b/etc/scribus.profile
@@ -40,6 +40,7 @@ include disable-xdg.inc
40 40
41include whitelist-var-common.inc 41include whitelist-var-common.inc
42 42
43apparmor
43caps.drop all 44caps.drop all
44net none 45net none
45nodbus 46nodbus
diff --git a/etc/slack.profile b/etc/slack.profile
index 54069f657..9a10e38fe 100644
--- a/etc/slack.profile
+++ b/etc/slack.profile
@@ -28,7 +28,7 @@ noroot
28notv 28notv
29nou2f 29nou2f
30protocol unix,inet,inet6,netlink 30protocol unix,inet,inet6,netlink
31seccomp 31seccomp !chroot
32shell none 32shell none
33 33
34disable-mnt 34disable-mnt
diff --git a/etc/sol.profile b/etc/sol.profile
index ea1620b31..4c8fdfbb1 100644
--- a/etc/sol.profile
+++ b/etc/sol.profile
@@ -17,6 +17,7 @@ include disable-xdg.inc
17include whitelist-common.inc 17include whitelist-common.inc
18include whitelist-var-common.inc 18include whitelist-var-common.inc
19 19
20apparmor
20caps.drop all 21caps.drop all
21ipc-namespace 22ipc-namespace
22net none 23net none
diff --git a/etc/sound-juicer.profile b/etc/sound-juicer.profile
new file mode 100644
index 000000000..ebd321573
--- /dev/null
+++ b/etc/sound-juicer.profile
@@ -0,0 +1,41 @@
1# Firejail profile for mpv
2# Description: Graphical audio CD ripper and encoder
3# This file is overwritten after every install/update
4# Persistent local customizations
5include sound-juicer.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.config/sound-juicer
10noblacklist ${MUSIC}
11
12include disable-common.inc
13include disable-devel.inc
14include disable-exec.inc
15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc
18include disable-xdg.inc
19
20include whitelist-var-common.inc
21
22apparmor
23caps.drop all
24netfilter
25no3d
26#nodbus
27nogroups
28nonewprivs
29noroot
30nosound
31nou2f
32notv
33novideo
34protocol unix,inet,inet6,netlink
35seccomp
36shell none
37tracelog
38
39private-cache
40private-dev
41private-tmp
diff --git a/etc/steam.profile b/etc/steam.profile
index bc90af837..5c8ced875 100644
--- a/etc/steam.profile
+++ b/etc/steam.profile
@@ -38,14 +38,13 @@ include disable-programs.inc
38 38
39include whitelist-var-common.inc 39include whitelist-var-common.inc
40 40
41# allow-debuggers needed for running some games with proton
42allow-debuggers
43caps.drop all 41caps.drop all
44#ipc-namespace 42#ipc-namespace
45netfilter 43netfilter
46# nodbus disabled as it breaks appindicator support 44# nodbus disabled as it breaks appindicator support
47#nodbus 45#nodbus
48nodvd 46nodvd
47# nVidia user may need to comment / ignore nogroups and noroot
49nogroups 48nogroups
50nonewprivs 49nonewprivs
51noroot 50noroot
@@ -54,9 +53,9 @@ nou2f
54# novideo should be commented for VR 53# novideo should be commented for VR
55novideo 54novideo
56protocol unix,inet,inet6,netlink 55protocol unix,inet,inet6,netlink
57# seccomp cause sometimes issues (see #2860, #2951), 56# seccomp cause sometimes issues (see #2951, #3267),
58# comment it or add 'ignore seccomp' to steam.local if so. 57# comment it or add 'ignore seccomp' to steam.local if so.
59seccomp 58seccomp !kcmp,!ptrace
60shell none 59shell none
61# tracelog disabled as it breaks integrated browser 60# tracelog disabled as it breaks integrated browser
62#tracelog 61#tracelog
diff --git a/etc/supertux2.profile b/etc/supertux2.profile
index 4c64ee766..a702faa9e 100644
--- a/etc/supertux2.profile
+++ b/etc/supertux2.profile
@@ -10,6 +10,7 @@ noblacklist ${HOME}/.local/share/supertux2
10 10
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc
13include disable-interpreters.inc 14include disable-interpreters.inc
14include disable-passwdmgr.inc 15include disable-passwdmgr.inc
15include disable-programs.inc 16include disable-programs.inc
@@ -19,6 +20,7 @@ whitelist ${HOME}/.local/share/supertux2
19include whitelist-common.inc 20include whitelist-common.inc
20include whitelist-var-common.inc 21include whitelist-var-common.inc
21 22
23apparmor
22caps.drop all 24caps.drop all
23net none 25net none
24nodbus 26nodbus
diff --git a/etc/tcpdump.profile b/etc/tcpdump.profile
index 3c46dfdcb..881fbf49e 100644
--- a/etc/tcpdump.profile
+++ b/etc/tcpdump.profile
@@ -19,6 +19,7 @@ include disable-xdg.inc
19 19
20include whitelist-common.inc 20include whitelist-common.inc
21 21
22apparmor
22caps.keep net_raw 23caps.keep net_raw
23ipc-namespace 24ipc-namespace
24#net tun0 25#net tun0
diff --git a/etc/terasology.profile b/etc/terasology.profile
index 9a8426435..3324a18be 100644
--- a/etc/terasology.profile
+++ b/etc/terasology.profile
@@ -28,7 +28,6 @@ include whitelist-common.inc
28caps.drop all 28caps.drop all
29ipc-namespace 29ipc-namespace
30net none 30net none
31netfilter
32nodbus 31nodbus
33nodvd 32nodvd
34nogroups 33nogroups
diff --git a/etc/textmaker18.profile b/etc/textmaker18.profile
index 8284df791..d28947394 100644
--- a/etc/textmaker18.profile
+++ b/etc/textmaker18.profile
@@ -7,4 +7,5 @@ include textmaker18.local
7include globals.local 7include globals.local
8 8
9# Redirect 9# Redirect
10include softmaker-common.profile 10include softmaker-common.inc
11
diff --git a/etc/textmaker18free.profile b/etc/textmaker18free.profile
index ad945ca55..7b4fd5b08 100644
--- a/etc/textmaker18free.profile
+++ b/etc/textmaker18free.profile
@@ -7,4 +7,5 @@ include textmaker18free.local
7include globals.local 7include globals.local
8 8
9# Redirect 9# Redirect
10include softmaker-common.profile 10include softmaker-common.inc
11
diff --git a/etc/tshark.profile b/etc/tshark.profile
index 22ced5d8a..211f59f29 100644
--- a/etc/tshark.profile
+++ b/etc/tshark.profile
@@ -19,6 +19,7 @@ include whitelist-common.inc
19include whitelist-usr-share-common.inc 19include whitelist-usr-share-common.inc
20include whitelist-var-common.inc 20include whitelist-var-common.inc
21 21
22apparmor
22#caps.keep net_raw 23#caps.keep net_raw
23caps.keep dac_override,net_admin,net_raw 24caps.keep dac_override,net_admin,net_raw
24ipc-namespace 25ipc-namespace
diff --git a/etc/tuxguitar.profile b/etc/tuxguitar.profile
index ae868a022..d2b13d9ee 100644
--- a/etc/tuxguitar.profile
+++ b/etc/tuxguitar.profile
@@ -15,6 +15,7 @@ include allow-java.inc
15 15
16include disable-common.inc 16include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc
18include disable-interpreters.inc 19include disable-interpreters.inc
19include disable-passwdmgr.inc 20include disable-passwdmgr.inc
20include disable-programs.inc 21include disable-programs.inc
@@ -22,6 +23,7 @@ include disable-xdg.inc
22 23
23include whitelist-var-common.inc 24include whitelist-var-common.inc
24 25
26apparmor
25caps.drop all 27caps.drop all
26netfilter 28netfilter
27no3d 29no3d
diff --git a/etc/unlzma.profile b/etc/unlzma.profile
index f7410b928..d9c72407f 100644
--- a/etc/unlzma.profile
+++ b/etc/unlzma.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/unxz.profile b/etc/unxz.profile
index f7410b928..d9c72407f 100644
--- a/etc/unxz.profile
+++ b/etc/unxz.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/warzone2100.profile b/etc/warzone2100.profile
index e65e0a0c3..e33cace49 100644
--- a/etc/warzone2100.profile
+++ b/etc/warzone2100.profile
@@ -22,6 +22,7 @@ whitelist ${HOME}/.warzone2100-3.2
22include whitelist-common.inc 22include whitelist-common.inc
23include whitelist-var-common.inc 23include whitelist-var-common.inc
24 24
25apparmor
25caps.drop all 26caps.drop all
26netfilter 27netfilter
27nodvd 28nodvd
diff --git a/etc/wget.profile b/etc/wget.profile
index 401926e2d..d402316e9 100644
--- a/etc/wget.profile
+++ b/etc/wget.profile
@@ -26,6 +26,7 @@ include disable-programs.inc
26include whitelist-usr-share-common.inc 26include whitelist-usr-share-common.inc
27include whitelist-var-common.inc 27include whitelist-var-common.inc
28 28
29apparmor
29caps.drop all 30caps.drop all
30ipc-namespace 31ipc-namespace
31machine-id 32machine-id
diff --git a/etc/whois.profile b/etc/whois.profile
index 0e60e18ab..9af6d6843 100644
--- a/etc/whois.profile
+++ b/etc/whois.profile
@@ -21,6 +21,7 @@ include disable-xdg.inc
21include whitelist-usr-share-common.inc 21include whitelist-usr-share-common.inc
22include whitelist-var-common.inc 22include whitelist-var-common.inc
23 23
24apparmor
24caps.drop all 25caps.drop all
25hostname whois 26hostname whois
26ipc-namespace 27ipc-namespace
diff --git a/etc/x-terminal-emulator.profile b/etc/x-terminal-emulator.profile
index e21b74030..b6424f342 100644
--- a/etc/x-terminal-emulator.profile
+++ b/etc/x-terminal-emulator.profile
@@ -8,7 +8,6 @@ include globals.local
8caps.drop all 8caps.drop all
9ipc-namespace 9ipc-namespace
10net none 10net none
11netfilter
12nodbus 11nodbus
13nogroups 12nogroups
14noroot 13noroot
diff --git a/etc/xcalc.profile b/etc/xcalc.profile
index 0ad423d30..a096f803c 100644
--- a/etc/xcalc.profile
+++ b/etc/xcalc.profile
@@ -17,7 +17,6 @@ include whitelist-var-common.inc
17 17
18caps.drop all 18caps.drop all
19net none 19net none
20netfilter
21no3d 20no3d
22nodbus 21nodbus
23nodvd 22nodvd
diff --git a/etc/xfce4-dict.profile b/etc/xfce4-dict.profile
index bc499bd30..a3e0c4633 100644
--- a/etc/xfce4-dict.profile
+++ b/etc/xfce4-dict.profile
@@ -15,6 +15,9 @@ include disable-interpreters.inc
15include disable-passwdmgr.inc 15include disable-passwdmgr.inc
16include disable-programs.inc 16include disable-programs.inc
17 17
18include whitelist-var-common.inc
19
20apparmor
18caps.drop all 21caps.drop all
19netfilter 22netfilter
20no3d 23no3d
diff --git a/etc/xfce4-notes.profile b/etc/xfce4-notes.profile
index 4dad1bf7a..c3d0930ff 100644
--- a/etc/xfce4-notes.profile
+++ b/etc/xfce4-notes.profile
@@ -17,6 +17,9 @@ include disable-interpreters.inc
17include disable-passwdmgr.inc 17include disable-passwdmgr.inc
18include disable-programs.inc 18include disable-programs.inc
19 19
20include whitelist-var-common.inc
21
22apparmor
20caps.drop all 23caps.drop all
21netfilter 24netfilter
22no3d 25no3d
diff --git a/etc/xpdf.profile b/etc/xpdf.profile
index 8c405ba1d..cb7ac4a59 100644
--- a/etc/xpdf.profile
+++ b/etc/xpdf.profile
@@ -19,6 +19,7 @@ include disable-xdg.inc
19 19
20include whitelist-var-common.inc 20include whitelist-var-common.inc
21 21
22apparmor
22caps.drop all 23caps.drop all
23machine-id 24machine-id
24net none 25net none
@@ -38,4 +39,4 @@ shell none
38 39
39private-dev 40private-dev
40private-tmp 41private-tmp
41 42memory-deny-write-execute
diff --git a/etc/xxd.profile b/etc/xxd.profile
index 569f194d3..864e8ce9c 100644
--- a/etc/xxd.profile
+++ b/etc/xxd.profile
@@ -1,6 +1,7 @@
1# Firejail profile for xxd 1# Firejail profile for xxd
2# Description: Tool to make (or reverse) a hex dump 2# Description: Tool to make (or reverse) a hex dump
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 xxd.local 6include xxd.local
6# Persistent global definitions 7# Persistent global definitions
@@ -8,4 +9,4 @@ include xxd.local
8#include globals.local 9#include globals.local
9 10
10# Redirect 11# Redirect
11include vim.profile 12include cpio.profile
diff --git a/etc/xz.profile b/etc/xz.profile
index f7410b928..d9c72407f 100644
--- a/etc/xz.profile
+++ b/etc/xz.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/xzcat.profile b/etc/xzcat.profile
index f7410b928..d9c72407f 100644
--- a/etc/xzcat.profile
+++ b/etc/xzcat.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/xzcmp.profile b/etc/xzcmp.profile
index f7410b928..d9c72407f 100644
--- a/etc/xzcmp.profile
+++ b/etc/xzcmp.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/xzdiff.profile b/etc/xzdiff.profile
index f7410b928..d9c72407f 100644
--- a/etc/xzdiff.profile
+++ b/etc/xzdiff.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/xzegrep.profile b/etc/xzegrep.profile
index f7410b928..d9c72407f 100644
--- a/etc/xzegrep.profile
+++ b/etc/xzegrep.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/xzfgrep.profile b/etc/xzfgrep.profile
index f7410b928..d9c72407f 100644
--- a/etc/xzfgrep.profile
+++ b/etc/xzfgrep.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/xzmore.profile b/etc/xzmore.profile
index f7410b928..d9c72407f 100644
--- a/etc/xzmore.profile
+++ b/etc/xzmore.profile
@@ -1,6 +1,7 @@
1# Firejail profile alias for cpio 1# Firejail profile alias for cpio
2# Description: Library and command line tools for XZ and LZMA compressed files 2# Description: Library and command line tools for XZ and LZMA compressed files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4 5
5# Redirect 6# Redirect
6include cpio.profile 7include cpio.profile
diff --git a/etc/zathura.profile b/etc/zathura.profile
index 703c8edd4..9ca5fd862 100644
--- a/etc/zathura.profile
+++ b/etc/zathura.profile
@@ -25,6 +25,7 @@ whitelist /usr/share/zathura
25include whitelist-usr-share-common.inc 25include whitelist-usr-share-common.inc
26include whitelist-var-common.inc 26include whitelist-var-common.inc
27 27
28apparmor
28caps.drop all 29caps.drop all
29ipc-namespace 30ipc-namespace
30machine-id 31machine-id
@@ -47,7 +48,8 @@ private-bin zathura
47private-cache 48private-cache
48private-dev 49private-dev
49private-etc alternatives,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,machine-id 50private-etc alternatives,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,machine-id
50private-lib gcc/*/*/libgcc_s.so.*,gcc/*/*/libstdc++.so.*,libarchive.so.*,libdjvulibre.so.*,libgirara-gtk*,libpoppler-glib.so.*,libspectre.so.*,zathura 51# private-lib has problems on Debian 10
52#private-lib gcc/*/*/libgcc_s.so.*,gcc/*/*/libstdc++.so.*,libarchive.so.*,libdjvulibre.so.*,libgirara-gtk*,libpoppler-glib.so.*,libspectre.so.*,zathura
51private-tmp 53private-tmp
52 54
53read-only ${HOME} 55read-only ${HOME}
diff --git a/etc/zoom.profile b/etc/zoom.profile
index 6d312aff6..6eac10703 100644
--- a/etc/zoom.profile
+++ b/etc/zoom.profile
@@ -27,7 +27,7 @@ nodvd
27nonewprivs 27nonewprivs
28noroot 28noroot
29notv 29notv
30protocol unix,inet,inet6 30protocol unix,inet,inet6,netlink
31seccomp 31seccomp !chroot
32 32
33private-tmp 33private-tmp
diff --git a/src/firecfg/firecfg.config b/src/firecfg/firecfg.config
index 4cd4fad6c..2798605d5 100644
--- a/src/firecfg/firecfg.config
+++ b/src/firecfg/firecfg.config
@@ -23,6 +23,7 @@ Natron
23PPSSPPQt 23PPSSPPQt
24QMediathekView 24QMediathekView
25QOwnNotes 25QOwnNotes
26Screenshot
26Telegram 27Telegram
27Viber 28Viber
28VirtualBox 29VirtualBox
@@ -148,6 +149,7 @@ desktopeditors
148devhelp 149devhelp
149dex2jar 150dex2jar
150dia 151dia
152dig
151digikam 153digikam
152dillo 154dillo
153dino 155dino
@@ -275,6 +277,7 @@ gnome-passwordsafe
275gnome-photos 277gnome-photos
276gnome-recipes 278gnome-recipes
277gnome-schedule 279gnome-schedule
280gnome-screenshot
278gnome-system-log 281gnome-system-log
279gnome-twitch 282gnome-twitch
280gnome-weather 283gnome-weather
@@ -303,6 +306,7 @@ hashcat
303hedgewars 306hedgewars
304hexchat 307hexchat
305highlight 308highlight
309host
306hugin 310hugin
307icecat 311icecat
308icedove 312icedove
@@ -466,6 +470,7 @@ nitroshare-nmh
466nitroshare-send 470nitroshare-send
467nitroshare-ui 471nitroshare-ui
468nomacs 472nomacs
473nslookup
469nylas 474nylas
470nyx 475nyx
471obs 476obs
@@ -479,6 +484,7 @@ ooviewdoc
479open-invaders 484open-invaders
480openarena 485openarena
481opencity 486opencity
487openclonk
482openoffice.org 488openoffice.org
483openshot 489openshot
484openshot-qt 490openshot-qt
@@ -546,6 +552,7 @@ rhythmbox-client
546ricochet 552ricochet
547riot-desktop 553riot-desktop
548riot-web 554riot-web
555ripperx
549ristretto 556ristretto
550rocketchat 557rocketchat
551rtorrent 558rtorrent
@@ -578,6 +585,7 @@ smtube
578snox 585snox
579soffice 586soffice
580sol 587sol
588sound-juicer
581soundconverter 589soundconverter
582spotify 590spotify
583sqlitebrowser 591sqlitebrowser
diff --git a/src/firejail/firejail.h b/src/firejail/firejail.h
index 0e4fcea6a..7391a8994 100644
--- a/src/firejail/firejail.h
+++ b/src/firejail/firejail.h
@@ -395,6 +395,7 @@ typedef enum {
395 MOUNT_TMPFS, 395 MOUNT_TMPFS,
396 MOUNT_NOEXEC, 396 MOUNT_NOEXEC,
397 MOUNT_RDWR, 397 MOUNT_RDWR,
398 MOUNT_RDWR_NOCHECK, // no check of ownership
398 OPERATION_MAX 399 OPERATION_MAX
399} OPERATION; 400} OPERATION;
400 401
@@ -403,8 +404,7 @@ void fs_blacklist(void);
403// mount a writable tmpfs 404// mount a writable tmpfs
404void fs_tmpfs(const char *dir, unsigned check_owner); 405void fs_tmpfs(const char *dir, unsigned check_owner);
405// remount noexec/nodev/nosuid or read-only or read-write 406// remount noexec/nodev/nosuid or read-only or read-write
406void fs_remount(const char *dir, OPERATION op, unsigned check_mnt); 407void fs_remount(const char *dir, OPERATION op, int rec);
407void fs_remount_rec(const char *dir, OPERATION op, unsigned check_mnt);
408// mount /proc and /sys directories 408// mount /proc and /sys directories
409void fs_proc_sys_dev_boot(void); 409void fs_proc_sys_dev_boot(void);
410// blacklist firejail configuration and runtime directories 410// blacklist firejail configuration and runtime directories
diff --git a/src/firejail/fs.c b/src/firejail/fs.c
index c7dd91b06..b642329bf 100644
--- a/src/firejail/fs.c
+++ b/src/firejail/fs.c
@@ -28,10 +28,9 @@
28#include <dirent.h> 28#include <dirent.h>
29#include <errno.h> 29#include <errno.h>
30 30
31
32#include <fcntl.h> 31#include <fcntl.h>
33#ifndef O_PATH 32#ifndef O_PATH
34# define O_PATH 010000000 33#define O_PATH 010000000
35#endif 34#endif
36 35
37#define MAX_BUF 4096 36#define MAX_BUF 4096
@@ -43,6 +42,8 @@
43//*********************************************** 42//***********************************************
44// process profile file 43// process profile file
45//*********************************************** 44//***********************************************
45static void fs_remount_rec(const char *dir, OPERATION op);
46
46static char *opstr[] = { 47static char *opstr[] = {
47 [BLACKLIST_FILE] = "blacklist", 48 [BLACKLIST_FILE] = "blacklist",
48 [BLACKLIST_NOLOG] = "blacklist-nolog", 49 [BLACKLIST_NOLOG] = "blacklist-nolog",
@@ -50,6 +51,7 @@ static char *opstr[] = {
50 [MOUNT_TMPFS] = "tmpfs", 51 [MOUNT_TMPFS] = "tmpfs",
51 [MOUNT_NOEXEC] = "noexec", 52 [MOUNT_NOEXEC] = "noexec",
52 [MOUNT_RDWR] = "read-write", 53 [MOUNT_RDWR] = "read-write",
54 [MOUNT_RDWR_NOCHECK] = "read-write",
53}; 55};
54 56
55typedef enum { 57typedef enum {
@@ -148,7 +150,7 @@ static void disable_file(OPERATION op, const char *filename) {
148 } 150 }
149 } 151 }
150 else if (op == MOUNT_READONLY || op == MOUNT_RDWR || op == MOUNT_NOEXEC) { 152 else if (op == MOUNT_READONLY || op == MOUNT_RDWR || op == MOUNT_NOEXEC) {
151 fs_remount_rec(fname, op, 1); 153 fs_remount_rec(fname, op);
152 // todo: last_disable = SUCCESSFUL; 154 // todo: last_disable = SUCCESSFUL;
153 } 155 }
154 else if (op == MOUNT_TMPFS) { 156 else if (op == MOUNT_TMPFS) {
@@ -425,21 +427,11 @@ void fs_blacklist(void) {
425 free(noblacklist); 427 free(noblacklist);
426} 428}
427 429
428static int get_mount_flags(const char *path, unsigned long *flags) {
429 struct statvfs buf;
430
431 if (statvfs(path, &buf) < 0)
432 return -errno;
433 *flags = buf.f_flag;
434 return 0;
435}
436
437//*********************************************** 430//***********************************************
438// mount namespace 431// mount namespace
439// - functions need fully resolved paths
440//*********************************************** 432//***********************************************
441 433
442// mount a writable tmpfs on directory 434// mount a writable tmpfs on directory; requires a resolved path
443void fs_tmpfs(const char *dir, unsigned check_owner) { 435void fs_tmpfs(const char *dir, unsigned check_owner) {
444 assert(dir); 436 assert(dir);
445 if (arg_debug) 437 if (arg_debug)
@@ -480,71 +472,114 @@ void fs_tmpfs(const char *dir, unsigned check_owner) {
480 close(fd); 472 close(fd);
481} 473}
482 474
483void fs_remount(const char *dir, OPERATION op, unsigned check_mnt) { 475// remount path, but preserve existing mount flags; requires a resolved path
484 assert(dir); 476static void fs_remount_simple(const char *path, OPERATION op) {
485 // check directory exists 477 assert(path);
478
479 // open path without following symbolic links
480 int fd = safe_fd(path, O_PATH|O_NOFOLLOW|O_CLOEXEC);
481 if (fd == -1)
482 goto out;
483 // identify file owner
486 struct stat s; 484 struct stat s;
487 int rv = stat(dir, &s); 485 if (fstat(fd, &s) == -1) {
488 if (rv == 0) { 486 // fstat can fail with EACCES if path is a FUSE mount,
489 unsigned long flags = 0; 487 // mounted without 'allow_root' or 'allow_other'
490 if (get_mount_flags(dir, &flags) != 0) { 488 if (errno != EACCES)
491 fwarning("cannot remount %s\n", dir); 489 errExit("fstat");
490 close(fd);
491 goto out;
492 }
493 // get mount flags
494 struct statvfs buf;
495 if (fstatvfs(fd, &buf) == -1)
496 errExit("fstatvfs");
497 unsigned long flags = buf.f_flag;
498
499 // read-write option
500 if (op == MOUNT_RDWR || op == MOUNT_RDWR_NOCHECK) {
501 // nothing to do if there is no read-only flag
502 if ((flags & MS_RDONLY) == 0) {
503 close(fd);
492 return; 504 return;
493 } 505 }
494 if (op == MOUNT_RDWR) { 506 // allow only user owned directories, except the user is root
495 // allow only user owned directories, except the user is root 507 if (op == MOUNT_RDWR && getuid() != 0 && s.st_uid != getuid()) {
496 if (getuid() != 0 && s.st_uid != getuid()) { 508 fwarning("you are not allowed to change %s to read-write\n", path);
497 fwarning("you are not allowed to change %s to read-write\n", dir); 509 close(fd);
498 return; 510 return;
499 }
500 if ((flags & MS_RDONLY) == 0)
501 return;
502 flags &= ~MS_RDONLY;
503 }
504 else if (op == MOUNT_NOEXEC) {
505 if ((flags & (MS_NOEXEC|MS_NODEV|MS_NOSUID)) == (MS_NOEXEC|MS_NODEV|MS_NOSUID))
506 return;
507 flags |= MS_NOEXEC|MS_NODEV|MS_NOSUID;
508 } 511 }
509 else if (op == MOUNT_READONLY) { 512 flags &= ~MS_RDONLY;
510 if ((flags & MS_RDONLY) == MS_RDONLY) 513 }
511 return; 514 // noexec option
512 flags |= MS_RDONLY; 515 else if (op == MOUNT_NOEXEC) {
516 // nothing to do if path is mounted noexec already
517 if ((flags & (MS_NOEXEC|MS_NODEV|MS_NOSUID)) == (MS_NOEXEC|MS_NODEV|MS_NOSUID)) {
518 close(fd);
519 return;
513 } 520 }
514 else 521 flags |= MS_NOEXEC|MS_NODEV|MS_NOSUID;
515 assert(0); 522 }
516 523 // read-only option
517 if (arg_debug) 524 else if (op == MOUNT_READONLY) {
518 printf("Mounting %s %s\n", opstr[op], dir); 525 // nothing to do if path is mounted read-only already
519 // mount --bind /bin /bin 526 if ((flags & MS_RDONLY) == MS_RDONLY) {
520 // mount --bind -o remount,rw /bin 527 close(fd);
521 if (mount(dir, dir, NULL, MS_BIND|MS_REC, NULL) < 0 || 528 return;
522 mount(NULL, dir, NULL, flags|MS_BIND|MS_REMOUNT, NULL) < 0)
523 errExit("remounting");
524 // run a sanity check on /proc/self/mountinfo
525 if (check_mnt) {
526 // confirm target of the last mount operation was dir; if there are other
527 // mount points contained inside dir, one of those will show up as target
528 // of the last mount operation instead
529 MountData *mptr = get_last_mount();
530 size_t len = strlen(dir);
531 if ((strncmp(mptr->dir, dir, len) != 0 ||
532 (*(mptr->dir + len) != '\0' && *(mptr->dir + len) != '/'))
533 && strcmp(dir, "/") != 0) // support read-only=/
534 errLogExit("invalid %s mount", opstr[op]);
535 } 529 }
536 fs_logger2(opstr[op], dir); 530 flags |= MS_RDONLY;
537 } 531 }
532 else
533 assert(0);
534
535 if (arg_debug)
536 printf("Mounting %s %s\n", opstr[op], path);
537 // mount --bind /bin /bin
538 char *proc;
539 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
540 errExit("asprintf");
541 if (mount(proc, proc, NULL, MS_BIND|MS_REC, NULL) < 0)
542 errExit("mount");
543 free(proc);
544 close(fd);
545
546 // mount --bind -o remount,ro /bin
547 // we need to open path again
548 fd = safe_fd(path, O_PATH|O_NOFOLLOW|O_CLOEXEC);
549 if (fd == -1)
550 errExit("open");
551 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
552 errExit("asprintf");
553 if (mount(NULL, proc, NULL, flags|MS_BIND|MS_REMOUNT, NULL) < 0)
554 errExit("mount");
555
556 // run a sanity check on /proc/self/mountinfo and confirm that target of the last
557 // mount operation was path; if there are other mount points contained inside path,
558 // one of those will show up as target of the last mount operation instead
559 MountData *mptr = get_last_mount();
560 size_t len = strlen(path);
561 if ((strncmp(mptr->dir, path, len) != 0 ||
562 (*(mptr->dir + len) != '\0' && *(mptr->dir + len) != '/'))
563 && strcmp(path, "/") != 0) // support read-only=/
564 errLogExit("invalid %s mount", opstr[op]);
565 fs_logger2(opstr[op], path);
566 free(proc);
567 close(fd);
568 return;
569
570out:
571 fwarning("not remounting %s\n", path);
538} 572}
539 573
540void fs_remount_rec(const char *dir, OPERATION op, unsigned check_mnt) { 574// remount recursively; requires a resolved path
575static void fs_remount_rec(const char *dir, OPERATION op) {
541 assert(dir); 576 assert(dir);
542 struct stat s; 577 struct stat s;
543 if (stat(dir, &s) != 0) 578 if (stat(dir, &s) != 0)
544 return; 579 return;
545 if (!S_ISDIR(s.st_mode)) { 580 if (!S_ISDIR(s.st_mode)) {
546 // no need to search in /proc/self/mountinfo for submounts if not a directory 581 // no need to search in /proc/self/mountinfo for submounts if not a directory
547 fs_remount(dir, op, check_mnt); 582 fs_remount_simple(dir, op);
548 return; 583 return;
549 } 584 }
550 // get mount point of the directory 585 // get mount point of the directory
@@ -558,7 +593,7 @@ void fs_remount_rec(const char *dir, OPERATION op, unsigned check_mnt) {
558 fwarning("read-only, read-write and noexec options are not applied recursively\n"); 593 fwarning("read-only, read-write and noexec options are not applied recursively\n");
559 mount_warning = 1; 594 mount_warning = 1;
560 } 595 }
561 fs_remount(dir, op, check_mnt); 596 fs_remount_simple(dir, op);
562 return; 597 return;
563 } 598 }
564 // build array with all mount points that need to get remounted 599 // build array with all mount points that need to get remounted
@@ -567,12 +602,25 @@ void fs_remount_rec(const char *dir, OPERATION op, unsigned check_mnt) {
567 // remount 602 // remount
568 char **tmp = arr; 603 char **tmp = arr;
569 while (*tmp) { 604 while (*tmp) {
570 fs_remount(*tmp, op, check_mnt); 605 fs_remount_simple(*tmp, op);
571 free(*tmp++); 606 free(*tmp++);
572 } 607 }
573 free(arr); 608 free(arr);
574} 609}
575 610
611// resolve a path and remount it
612void fs_remount(const char *path, OPERATION op, int rec) {
613 assert(path);
614 char *rpath = realpath(path, NULL);
615 if (rpath) {
616 if (rec)
617 fs_remount_rec(rpath, op);
618 else
619 fs_remount_simple(rpath, op);
620 free(rpath);
621 }
622}
623
576// Disable /mnt, /media, /run/mount and /run/media access 624// Disable /mnt, /media, /run/mount and /run/media access
577void fs_mnt(const int enforce) { 625void fs_mnt(const int enforce) {
578 if (enforce) { 626 if (enforce) {
@@ -749,22 +797,22 @@ void fs_basic_fs(void) {
749 if (arg_debug) 797 if (arg_debug)
750 printf("Basic read-only filesystem:\n"); 798 printf("Basic read-only filesystem:\n");
751 if (!arg_writable_etc) { 799 if (!arg_writable_etc) {
752 fs_remount("/etc", MOUNT_READONLY, 0); 800 fs_remount("/etc", MOUNT_READONLY, 1);
753 if (uid) 801 if (uid)
754 fs_remount("/etc", MOUNT_NOEXEC, 0); 802 fs_remount("/etc", MOUNT_NOEXEC, 1);
755 } 803 }
756 if (!arg_writable_var) { 804 if (!arg_writable_var) {
757 fs_remount("/var", MOUNT_READONLY, 0); 805 fs_remount("/var", MOUNT_READONLY, 1);
758 if (uid) 806 if (uid)
759 fs_remount("/var", MOUNT_NOEXEC, 0); 807 fs_remount("/var", MOUNT_NOEXEC, 1);
760 } 808 }
761 fs_remount("/bin", MOUNT_READONLY, 0); 809 fs_remount("/usr", MOUNT_READONLY, 1);
762 fs_remount("/sbin", MOUNT_READONLY, 0); 810 fs_remount("/bin", MOUNT_READONLY, 1);
763 fs_remount("/lib", MOUNT_READONLY, 0); 811 fs_remount("/sbin", MOUNT_READONLY, 1);
764 fs_remount("/lib64", MOUNT_READONLY, 0); 812 fs_remount("/lib", MOUNT_READONLY, 1);
765 fs_remount("/lib32", MOUNT_READONLY, 0); 813 fs_remount("/lib64", MOUNT_READONLY, 1);
766 fs_remount("/libx32", MOUNT_READONLY, 0); 814 fs_remount("/lib32", MOUNT_READONLY, 1);
767 fs_remount("/usr", MOUNT_READONLY, 0); 815 fs_remount("/libx32", MOUNT_READONLY, 1);
768 816
769 // update /var directory in order to support multiple sandboxes running on the same root directory 817 // update /var directory in order to support multiple sandboxes running on the same root directory
770 fs_var_lock(); 818 fs_var_lock();
@@ -773,7 +821,7 @@ void fs_basic_fs(void) {
773 if (!arg_writable_var_log) 821 if (!arg_writable_var_log)
774 fs_var_log(); 822 fs_var_log();
775 else 823 else
776 fs_remount("/var/log", MOUNT_RDWR, 0); 824 fs_remount("/var/log", MOUNT_RDWR_NOCHECK, 0);
777 825
778 fs_var_lib(); 826 fs_var_lib();
779 fs_var_cache(); 827 fs_var_cache();
diff --git a/src/firejail/profile.c b/src/firejail/profile.c
index 969209869..c7269857d 100644
--- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -151,6 +151,10 @@ static int check_nodbus(void) {
151 return arg_nodbus != 0; 151 return arg_nodbus != 0;
152} 152}
153 153
154static int check_nosound(void) {
155 return arg_nosound != 0;
156}
157
154static int check_x11(void) { 158static int check_x11(void) {
155 return (arg_x11_block || arg_x11_xorg || getenv("FIREJAIL_X11")); 159 return (arg_x11_block || arg_x11_xorg || getenv("FIREJAIL_X11"));
156} 160}
@@ -167,6 +171,7 @@ Cond conditionals[] = {
167 {"HAS_APPIMAGE", check_appimage}, 171 {"HAS_APPIMAGE", check_appimage},
168 {"HAS_NET", check_netoptions}, 172 {"HAS_NET", check_netoptions},
169 {"HAS_NODBUS", check_nodbus}, 173 {"HAS_NODBUS", check_nodbus},
174 {"HAS_NOSOUND", check_nosound},
170 {"HAS_X11", check_x11}, 175 {"HAS_X11", check_x11},
171 {"BROWSER_DISABLE_U2F", check_disable_u2f}, 176 {"BROWSER_DISABLE_U2F", check_disable_u2f},
172 {"BROWSER_ALLOW_DRM", check_allow_drm}, 177 {"BROWSER_ALLOW_DRM", check_allow_drm},
diff --git a/src/man/firejail-profile.txt b/src/man/firejail-profile.txt
index 84aed41a4..9af25bf63 100644
--- a/src/man/firejail-profile.txt
+++ b/src/man/firejail-profile.txt
@@ -103,7 +103,7 @@ Example: "?HAS_APPIMAGE: whitelist ${HOME}/special/appimage/dir"
103 103
104This example will load the whitelist profile line only if the \-\-appimage option has been specified on the command line. 104This example will load the whitelist profile line only if the \-\-appimage option has been specified on the command line.
105 105
106Currently the only conditionals supported this way are HAS_APPIMAGE, HAS_NET, HAS_NODBUS and HAS_X11. The conditionals BROWSER_DISABLE_U2F and BROWSER_ALLOW_DRM 106Currently the only conditionals supported this way are HAS_APPIMAGE, HAS_NET, HAS_NODBUS, HAS_NOSOUND and HAS_X11. The conditionals BROWSER_DISABLE_U2F and BROWSER_ALLOW_DRM
107can be enabled or disabled globally in Firejail's configuration file. 107can be enabled or disabled globally in Firejail's configuration file.
108 108
109The profile line may be any profile line that you would normally use in a profile \fBexcept\fR for "quiet" and "include" lines. 109The profile line may be any profile line that you would normally use in a profile \fBexcept\fR for "quiet" and "include" lines.
diff --git a/src/profstats/Makefile.in b/src/profstats/Makefile.in
new file mode 100644
index 000000000..4ada23c23
--- /dev/null
+++ b/src/profstats/Makefile.in
@@ -0,0 +1,14 @@
1all: ../../etc/profstats
2
3include ../common.mk
4
5%.o : %.c $(H_FILE_LIST)
6 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@
7
8../../etc/profstats: $(OBJS)
9 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)
10
11clean:; rm -fr *.o ../../etc/profstats *.gcov *.gcda *.gcno *.plist
12
13distclean: clean
14 rm -fr Makefile
diff --git a/src/profstats/main.c b/src/profstats/main.c
new file mode 100644
index 000000000..775142643
--- /dev/null
+++ b/src/profstats/main.c
@@ -0,0 +1,240 @@
1 /*
2 * Copyright (C) 2014-2020 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include <stdio.h>
21#include <stdlib.h>
22#include <string.h>
23#include <assert.h>
24
25#define MAXBUF 2048
26// stats
27static int cnt_profiles = 0;
28static int cnt_apparmor = 0;
29static int cnt_seccomp = 0;
30static int cnt_caps = 0;
31static int cnt_dotlocal = 0;
32static int cnt_globalsdotlocal = 0;
33static int cnt_netnone = 0;
34static int cnt_noexec = 0; // include disable-exec.inc
35static int cnt_privatedev = 0;
36static int cnt_privatetmp = 0;
37static int cnt_whitelistvar = 0; // include whitelist-var-common.inc
38static int cnt_ssh = 0;
39
40static int level = 0;
41static int arg_debug = 0;
42static int arg_apparmor = 0;
43static int arg_caps = 0;
44static int arg_seccomp = 0;
45static int arg_noexec = 0;
46static int arg_privatedev = 0;
47static int arg_privatetmp = 0;
48static int arg_whitelistvar = 0;
49static int arg_ssh = 0;
50
51static void usage(void) {
52 printf("proftool - print profile statistics\n");
53 printf("Usage: proftool [options] file[s]\n");
54 printf("Options:\n");
55 printf(" --apparmor - print profiles without apparmor\n");
56 printf(" --caps - print profiles without caps\n");
57 printf(" --ssh - print profiles without \"include disable-common.inc\"\n");
58 printf(" --noexec - print profiles without \"include disable-exec.inc\"\n");
59 printf(" --private-dev - print profiles without private-dev\n");
60 printf(" --private-tmp - print profiles without private-tmp\n");
61 printf(" --seccomp - print profiles without seccomp\n");
62 printf(" --whitelist-var - print profiles without \"include whitelist-var-common.inc\"\n");
63 printf(" --debug\n");
64 printf("\n");
65}
66
67void process_file(const char *fname) {
68 assert(fname);
69
70 if (arg_debug)
71 printf("processing #%s#\n", fname);
72 level++;
73 assert(level < 32); // to do - check in firejail code
74
75 FILE *fp = fopen(fname, "r");
76 if (!fp) {
77 fprintf(stderr, "Error: cannot open %s\n", fname);
78 exit(1);
79 }
80
81 char buf[MAXBUF];
82 while (fgets(buf, MAXBUF, fp)) {
83 char *ptr = strchr(buf, '\n');
84 if (ptr)
85 *ptr = '\0';
86 ptr = buf;
87
88 while (*ptr == ' ' || *ptr == '\t')
89 ptr++;
90 if (*ptr == '\n' || *ptr == '#')
91 continue;
92
93 if (strncmp(ptr, "seccomp", 7) == 0)
94 cnt_seccomp++;
95 else if (strncmp(ptr, "caps", 4) == 0)
96 cnt_caps++;
97 else if (strncmp(ptr, "include disable-exec.inc", 24) == 0)
98 cnt_noexec++;
99 else if (strncmp(ptr, "include whitelist-var-common.inc", 32) == 0)
100 cnt_whitelistvar++;
101 else if (strncmp(ptr, "include disable-common.inc", 26) == 0)
102 cnt_ssh++;
103 else if (strncmp(ptr, "net none", 8) == 0)
104 cnt_netnone++;
105 else if (strncmp(ptr, "apparmor", 8) == 0)
106 cnt_apparmor++;
107 else if (strncmp(ptr, "private-dev", 11) == 0)
108 cnt_privatedev++;
109 else if (strncmp(ptr, "private-tmp", 11) == 0)
110 cnt_privatetmp++;
111 else if (strncmp(ptr, "include ", 8) == 0) {
112 // not processing .local files
113 if (strstr(ptr, ".local")) {
114//printf("dotlocal %d, level %d - #%s#, redirect #%s#\n", cnt_dotlocal, level, fname, buf + 8);
115 if (strstr(ptr, "globals.local"))
116 cnt_globalsdotlocal++;
117 else
118 cnt_dotlocal++;
119 continue;
120 }
121 process_file(buf + 8);
122 }
123 }
124
125 fclose(fp);
126 level--;
127}
128
129int main(int argc, char **argv) {
130 if (argc <= 1) {
131 usage();
132 return 1;
133 }
134
135 int start = 1;
136 int i;
137 for (i = 1; i < argc; i++) {
138 if (strcmp(argv[i], "--help") == 0) {
139 usage();
140 return 0;
141 }
142 else if (strcmp(argv[i], "--debug") == 0)
143 arg_debug = 1;
144 else if (strcmp(argv[i], "--apparmor") == 0)
145 arg_apparmor = 1;
146 else if (strcmp(argv[i], "--caps") == 0)
147 arg_caps = 1;
148 else if (strcmp(argv[i], "--seccomp") == 0)
149 arg_seccomp = 1;
150 else if (strcmp(argv[i], "--noexec") == 0)
151 arg_noexec = 1;
152 else if (strcmp(argv[i], "--private-dev") == 0)
153 arg_privatedev = 1;
154 else if (strcmp(argv[i], "--private-tmp") == 0)
155 arg_privatetmp = 1;
156 else if (strcmp(argv[i], "--whitelist-var") == 0)
157 arg_whitelistvar = 1;
158 else if (strcmp(argv[i], "--ssh") == 0)
159 arg_ssh = 1;
160 else if (*argv[i] == '-') {
161 fprintf(stderr, "Error: invalid option %s\n", argv[i]);
162 return 1;
163 }
164 else
165 break;
166 }
167
168 start = i;
169 if (i == argc) {
170 fprintf(stderr, "Error: no porfile file specified\n");
171 return 1;
172 }
173
174 for (i = start; i < argc; i++) {
175 cnt_profiles++;
176
177 // watch seccomp
178 int seccomp = cnt_seccomp;
179 int caps = cnt_caps;
180 int apparmor = cnt_apparmor;
181 int noexec = cnt_noexec;
182 int privatetmp = cnt_privatetmp;
183 int privatedev = cnt_privatedev;
184 int dotlocal = cnt_dotlocal;
185 int globalsdotlocal = cnt_globalsdotlocal;
186 int whitelistvar = cnt_whitelistvar;
187 int ssh = cnt_ssh;
188
189 // process file
190 process_file(argv[i]);
191
192 // warnings
193 if ((caps + 2) <= cnt_caps) {
194 printf("Warning: multiple caps in %s\n", argv[i]);
195 cnt_caps = caps + 1;
196 }
197
198 // fix redirections
199 if (cnt_dotlocal > (dotlocal + 1))
200 cnt_dotlocal = dotlocal + 1;
201 if (cnt_globalsdotlocal > (globalsdotlocal + 1))
202 cnt_globalsdotlocal = globalsdotlocal + 1;
203
204 if (arg_apparmor && apparmor == cnt_apparmor)
205 printf("No apparmor found in %s\n", argv[i]);
206 if (arg_caps && caps == cnt_caps)
207 printf("No caps found in %s\n", argv[i]);
208 if (arg_seccomp && seccomp == cnt_seccomp)
209 printf("No seccomp found in %s\n", argv[i]);
210 if (arg_noexec && noexec == cnt_noexec)
211 printf("No include disable-exec.inc found in %s\n", argv[i]);
212 if (arg_privatedev && privatedev == cnt_privatedev)
213 printf("No private-dev found in %s\n", argv[i]);
214 if (arg_privatetmp && privatetmp == cnt_privatetmp)
215 printf("No private-tmp found in %s\n", argv[i]);
216 if (arg_whitelistvar && whitelistvar == cnt_whitelistvar)
217 printf("No include whitelist-var-common.inc found in %s\n", argv[i]);
218 if (arg_ssh && ssh == cnt_ssh)
219 printf("No include disable-common.inc found in %s\n", argv[i]);
220
221 assert(level == 0);
222 }
223
224 printf("\n");
225 printf("Stats:\n");
226 printf(" profiles\t\t\t%d\n", cnt_profiles);
227 printf(" include local profile\t%d (include profile-name.local)\n", cnt_dotlocal);
228 printf(" include globals\t\t%d (include globals.local)\n", cnt_dotlocal);
229 printf(" blacklist ~/.ssh\t\t%d (include disable-common.inc)\n", cnt_ssh);
230 printf(" seccomp\t\t\t%d\n", cnt_seccomp);
231 printf(" capabilities\t\t%d\n", cnt_caps);
232 printf(" noexec\t\t\t%d (include disable-exec.inc)\n", cnt_noexec);
233 printf(" apparmor\t\t\t%d\n", cnt_apparmor);
234 printf(" private-dev\t\t\t%d\n", cnt_privatedev);
235 printf(" private-tmp\t\t\t%d\n", cnt_privatetmp);
236 printf(" whitelist var directory\t%d (include whitelist-var-common.inc)\n", cnt_whitelistvar);
237 printf(" net none\t\t\t%d\n", cnt_netnone);
238 printf("\n");
239 return 0;
240} \ No newline at end of file