aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in2
-rw-r--r--README16
-rw-r--r--README.md69
-rw-r--r--RELNOTES18
-rwxr-xr-xconfigure18
-rw-r--r--configure.ac2
-rw-r--r--etc/atom-beta.profile2
-rw-r--r--etc/atom.profile2
-rw-r--r--etc/atril.profile2
-rw-r--r--etc/audacity.profile2
-rw-r--r--etc/aweather.profile2
-rw-r--r--etc/cherrytree.profile3
-rw-r--r--etc/chromium.profile3
-rw-r--r--etc/disable-common.inc54
-rw-r--r--etc/disable-devel.inc2
-rw-r--r--etc/disable-programs.inc11
-rw-r--r--etc/eog.profile3
-rw-r--r--etc/evolution.profile2
-rw-r--r--etc/feh.profile6
-rw-r--r--etc/file.profile17
-rw-r--r--etc/filezilla.profile5
-rw-r--r--etc/flowblade.profile13
-rw-r--r--etc/franz.profile6
-rw-r--r--etc/gajim.profile2
-rw-r--r--etc/gimp.profile10
-rw-r--r--etc/git.profile4
-rw-r--r--etc/gpredict.profile4
-rw-r--r--etc/gwenview.profile5
-rw-r--r--etc/gzip.profile14
-rw-r--r--etc/inkscape.profile10
-rw-r--r--etc/jitsi.profile2
-rw-r--r--etc/kmail.profile2
-rw-r--r--etc/less.profile6
-rw-r--r--etc/luminance-hdr.profile14
-rw-r--r--etc/mutt.profile1
-rw-r--r--etc/okular.profile5
-rw-r--r--etc/openshot.profile13
-rw-r--r--etc/pidgin.profile2
-rw-r--r--etc/pix.profile3
-rw-r--r--etc/psi-plus.profile4
-rw-r--r--etc/qbittorrent.profile4
-rw-r--r--etc/qpdfview.profile2
-rw-r--r--etc/qtox.profile2
-rw-r--r--etc/quiterss.profile9
-rw-r--r--etc/ranger.profile3
-rw-r--r--etc/rhythmbox.profile2
-rw-r--r--etc/rtorrent.profile1
-rw-r--r--etc/server.profile11
-rw-r--r--etc/slack.profile29
-rw-r--r--etc/spotify.profile22
-rw-r--r--etc/start-tor-browser.profile20
-rw-r--r--etc/strings.profile9
-rw-r--r--etc/synfigstudio.profile6
-rw-r--r--etc/tar.profile14
-rw-r--r--etc/telegram.profile1
-rw-r--r--etc/transmission-gtk.profile2
-rw-r--r--etc/transmission-qt.profile5
-rw-r--r--etc/uget-gtk.profile13
-rw-r--r--etc/unrar.profile15
-rw-r--r--etc/unzip.profile16
-rw-r--r--etc/uudeview.profile14
-rw-r--r--etc/vim.profile3
-rw-r--r--etc/virtualbox.profile12
-rw-r--r--etc/xiphos.profile30
-rw-r--r--etc/xpdf.profile9
-rw-r--r--etc/xplayer.profile2
-rw-r--r--etc/xzdec.profile14
-rw-r--r--etc/zathura.profile6
-rwxr-xr-xmkuid.sh2
-rw-r--r--platform/debian/conffiles7
-rwxr-xr-xplatform/rpm/old-mkrpm.sh542
-rw-r--r--src/faudit/syscall.c3
-rw-r--r--src/firecfg/firecfg.config7
-rw-r--r--src/firejail/appimage.c31
-rw-r--r--src/firejail/appimage_size.c143
-rw-r--r--src/firejail/firejail.h4
-rw-r--r--src/firejail/fs.c6
-rw-r--r--src/firejail/fs_bin.c4
-rw-r--r--src/firejail/fs_etc.c4
-rw-r--r--src/firejail/fs_home.c2
-rw-r--r--src/firejail/fs_mkdir.c4
-rw-r--r--src/firejail/fs_whitelist.c1
-rw-r--r--src/firejail/ls.c8
-rw-r--r--src/firejail/main.c3
-rw-r--r--src/firejail/netfilter.c12
-rw-r--r--src/firejail/sandbox.c7
-rw-r--r--src/firejail/x11.c12
-rw-r--r--src/firemon/interface.c2
-rw-r--r--src/firemon/procevent.c2
-rw-r--r--src/man/firejail-login.txt4
-rwxr-xr-xtest/filters/noroot.exp44
-rwxr-xr-xtest/fs/fs.sh3
-rwxr-xr-xtest/fs/sys_fs.exp44
93 files changed, 1207 insertions, 331 deletions
diff --git a/Makefile.in b/Makefile.in
index 9574c74bc..dbf53e2cb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -141,7 +141,7 @@ uninstall:
141 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg 141 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg
142 142
143DISTFILES = "src etc platform configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkuid.sh COPYING README RELNOTES" 143DISTFILES = "src etc platform configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkuid.sh COPYING README RELNOTES"
144DISTFILES_TEST = "test/apps test/apps-x11 test/environment test/profiles test/utils test/compile test/filters test/network test/fs test/sysutils" 144DISTFILES_TEST = "test/apps test/apps-x11 test/apps-x11-xorg test/environment test/profiles test/utils test/compile test/filters test/network test/fs test/sysutils"
145 145
146dist: 146dist:
147 mv config.status config.status.old 147 mv config.status config.status.old
diff --git a/README b/README
index 46c314a64..cbd15f02a 100644
--- a/README
+++ b/README
@@ -47,6 +47,7 @@ Aleksey Manevich (https://github.com/manevich)
47 - added --join-or-start command 47 - added --join-or-start command
48 - CVE-2016-7545 48 - CVE-2016-7545
49Fred-Barclay (https://github.com/Fred-Barclay) 49Fred-Barclay (https://github.com/Fred-Barclay)
50 - lots of profile fixes
50 - added Vivaldi, Atril profiles 51 - added Vivaldi, Atril profiles
51 - added PaleMoon profile 52 - added PaleMoon profile
52 - split Icedove and Thunderbird profiles 53 - split Icedove and Thunderbird profiles
@@ -69,7 +70,7 @@ Fred-Barclay (https://github.com/Fred-Barclay)
69 - added audacity profile 70 - added audacity profile
70 - fixed Telegram and qtox profiles 71 - fixed Telegram and qtox profiles
71 - added Atom Beta and Atom profiles 72 - added Atom Beta and Atom profiles
72 - tightened 0ad, atril, evince, gthumb, pix, qtox, and xreader profiles. 73 - tightened 0ad, atril, evince, gthumb, pix, qtox, and xreader profiles
73 - several private-bin conversions 74 - several private-bin conversions
74 - added jitsi profile 75 - added jitsi profile
75 - pidgin private-bin conversion 76 - pidgin private-bin conversion
@@ -77,6 +78,16 @@ Fred-Barclay (https://github.com/Fred-Barclay)
77 - added gnome-chess profile 78 - added gnome-chess profile
78 - added DOSBox profile 79 - added DOSBox profile
79 - evince profile enhancement 80 - evince profile enhancement
81 - tightened Spotify profile
82 - added xiphos and Tor Browser Bundle profiles
83valoq (https://github.com/valoq)
84 - LibreOffice profile fixes
85 - cherrytree profile fixes
86 - added support for /srv in --whitelist feature
87 - Eye of GNOME and Evolution profiles
88 - blacklist suid binaries in disable-common.inc
89Rafael Cavalcanti (https://github.com/rccavalcanti)
90 - chromium profile fixes for Arch Linux
80Deelvesh Bunjun (https://github.com/DeelveshBunjun) 91Deelvesh Bunjun (https://github.com/DeelveshBunjun)
81 - added xpdf profile 92 - added xpdf profile
82vismir2 (https://github.com/vismir2) 93vismir2 (https://github.com/vismir2)
@@ -84,9 +95,6 @@ vismir2 (https://github.com/vismir2)
84Dara Adib (https://github.com/daradib) 95Dara Adib (https://github.com/daradib)
85 - ssh profile fix 96 - ssh profile fix
86 - evince profile fix 97 - evince profile fix
87valoq (https://github.com/valoq)
88 - LibreOffice profile fixes
89 - cherrytree profile fixes
90vismir2 (https://github.com/vismir2) 98vismir2 (https://github.com/vismir2)
91 - feh, ranger, 7z, keepass, keepassx and zathura profiles 99 - feh, ranger, 7z, keepass, keepassx and zathura profiles
92 - lots of profile fixes 100 - lots of profile fixes
diff --git a/README.md b/README.md
index 1038e1ef8..ff1b2e8ba 100644
--- a/README.md
+++ b/README.md
@@ -42,76 +42,15 @@ If you keep your Firejail profiles in a public repository, please give us a link
42* https://github.com/chiraag-nataraj/firejail-profiles 42* https://github.com/chiraag-nataraj/firejail-profiles
43 43
44* https://github.com/triceratops1/fe 44* https://github.com/triceratops1/fe
45`````
46 45
46Use this issue to request new profiles: https://github.com/netblue30/firejail/issues/825
47````` 47`````
48# Current development version: 0.9.43
49 48
50## X11 development
51`````
52 --x11=none
53 Blacklist /tmp/.X11-unix directory, ${HOME}/.Xauthority and the
54 file specified in ${XAUTHORITY} environment variable. Remove
55 DISPLAY and XAUTHORITY environment variables. Stop with error
56 message if X11 abstract socket will be accessible in jail.
57
58 --x11=xorg
59 Sandbox the application using the untrusted mode implemented by
60 X11 security extension. The extension is available in Xorg
61 package and it is installed by default on most Linux distribu‐
62 tions. It provides support for a simple trusted/untrusted con‐
63 nection model. Untrusted clients are restricted in certain ways
64 to prevent them from reading window contents of other clients,
65 stealing input events, etc.
66
67 The untrusted mode has several limitations. A lot of regular
68 programs assume they are a trusted X11 clients and will crash
69 or lock up when run in untrusted mode. Chromium browser and
70 xterm are two examples. Firefox and transmission-gtk seem to be
71 working fine. A network namespace is not required for this
72 option.
73
74 Example:
75 $ firejail --x11=xorg firefox
76````` 49`````
77 50# Current development version: 0.9.45
78## Other command line options
79````` 51`````
80 --put=name|pid src-filename dest-filename
81 Put src-filename in sandbox container. The container is specified by name or PID.
82
83 --allusers
84 All user home directories are visible inside the sandbox. By default, only current user home
85 directory is visible.
86
87 Example:
88 $ firejail --allusers
89
90 --join-or-start=name
91 Join the sandbox identified by name or start a new one. Same as "firejail --join=name" if
92 sandbox with specified name exists, otherwise same as "firejail --name=name ..."
93 Note that in contrary to other join options there is respective profile option.
94
95 --no3d Disable 3D hardware acceleration.
96
97 Example:
98 $ firejail --no3d firefox
99
100 --veth-name=name
101 Use this name for the interface connected to the bridge for
102 --net=bridge_interface commands, instead of the default one.
103
104 Example:
105 $ firejail --net=br0 --veth-name=if0
106 52
107````` 53`````
108 54## New Profiles
109## New profile commands 55xiphos, Tor Browser Bundle
110
111x11 xpra, x11 xephyr, x11 none, x11 xorg, allusers, join-or-start
112
113## New profiles
114
115qpdfview, mupdf, Luminance HDR, Synfig Studio, Gimp, Inkscape, feh, ranger, zathura, 7z, keepass, keepassx,
116claws-mail, mutt, git, emacs, vim, xpdf
117 56
diff --git a/RELNOTES b/RELNOTES
index 4c191fc82..c0fb8b20b 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -1,9 +1,15 @@
1firejail (0.9.43) baseline; urgency=low 1firejail (0.9.45) baseline; urgency=low
2 * development version, work in progress
3 -- netblue30 <netblue30@yahoo.com> Sun, 23 Oct 2016 08:00:00 -0500
4 * new profiles: xiphos, Tor Browser Bundle
5
6firejail (0.9.44) baseline; urgency=low
2 * CVE-2016-7545 submitted by Aleksey Manevich 7 * CVE-2016-7545 submitted by Aleksey Manevich
3 * development version
4 * modifs: removed man firejail-config 8 * modifs: removed man firejail-config
5 * modifs: --private-tmp whitelists /tmp/.X11-unix directory 9 * modifs: --private-tmp whitelists /tmp/.X11-unix directory
6 * modifs: Nvidia drivers added to --private-dev 10 * modifs: Nvidia drivers added to --private-dev
11 * modifs: /srv supported by --whitelist
12 * feature: allow user access to /sys/fs (--noblacklist=/sys/fs)
7 * feature: support starting/joining sandbox is a single command 13 * feature: support starting/joining sandbox is a single command
8 (--join-or-start) 14 (--join-or-start)
9 * feature: X11 detection support for --audit 15 * feature: X11 detection support for --audit
@@ -15,11 +21,15 @@ firejail (0.9.43) baseline; urgency=low
15 * feature: X11 security extension (--x11=xorg) 21 * feature: X11 security extension (--x11=xorg)
16 * feature: disable 3D hardware acceleration (--no3d) 22 * feature: disable 3D hardware acceleration (--no3d)
17 * feature: x11 xpra, x11 xephyr, x11 block, allusers, no3d profile commands 23 * feature: x11 xpra, x11 xephyr, x11 block, allusers, no3d profile commands
24 * feature: move files in sandbox (--put)
25 * feature: accept wildcard patterns in user name field of restricted
26 shell login feature
18 * new profiles: qpdfview, mupdf, Luminance HDR, Synfig Studio, Gimp, Inkscape 27 * new profiles: qpdfview, mupdf, Luminance HDR, Synfig Studio, Gimp, Inkscape
19 * new profiles: feh, ranger, zathura, 7z, keepass, keepassx, 28 * new profiles: feh, ranger, zathura, 7z, keepass, keepassx,
20 * new profiles: claws-mail, mutt, git, emacs, vim, xpdf 29 * new profiles: claws-mail, mutt, git, emacs, vim, xpdf, VirtualBox, OpenShot
30 * new profiles: Flowblade, Eye of GNOME (eog), Evolution
21 * bugfixes 31 * bugfixes
22 -- netblue30 <netblue30@yahoo.com> Fri, 9 Sept 2016 08:00:00 -0500 32 -- netblue30 <netblue30@yahoo.com> Fri, 21 Oct 2016 08:00:00 -0500
23 33
24firejail (0.9.42) baseline; urgency=low 34firejail (0.9.42) baseline; urgency=low
25 * security: --whitelist deleted files, submitted by Vasya Novikov 35 * security: --whitelist deleted files, submitted by Vasya Novikov
diff --git a/configure b/configure
index 48b891c40..a470dffba 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
1#! /bin/sh 1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles. 2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for firejail 0.9.44~rc1. 3# Generated by GNU Autoconf 2.69 for firejail 0.9.45.
4# 4#
5# Report bugs to <netblue30@yahoo.com>. 5# Report bugs to <netblue30@yahoo.com>.
6# 6#
@@ -580,8 +580,8 @@ MAKEFLAGS=
580# Identity of this package. 580# Identity of this package.
581PACKAGE_NAME='firejail' 581PACKAGE_NAME='firejail'
582PACKAGE_TARNAME='firejail' 582PACKAGE_TARNAME='firejail'
583PACKAGE_VERSION='0.9.44~rc1' 583PACKAGE_VERSION='0.9.45'
584PACKAGE_STRING='firejail 0.9.44~rc1' 584PACKAGE_STRING='firejail 0.9.45'
585PACKAGE_BUGREPORT='netblue30@yahoo.com' 585PACKAGE_BUGREPORT='netblue30@yahoo.com'
586PACKAGE_URL='http://firejail.wordpress.com' 586PACKAGE_URL='http://firejail.wordpress.com'
587 587
@@ -1259,7 +1259,7 @@ if test "$ac_init_help" = "long"; then
1259 # Omit some internal or obsolete options to make the list less imposing. 1259 # Omit some internal or obsolete options to make the list less imposing.
1260 # This message is too long to be a string in the A/UX 3.1 sh. 1260 # This message is too long to be a string in the A/UX 3.1 sh.
1261 cat <<_ACEOF 1261 cat <<_ACEOF
1262\`configure' configures firejail 0.9.44~rc1 to adapt to many kinds of systems. 1262\`configure' configures firejail 0.9.45 to adapt to many kinds of systems.
1263 1263
1264Usage: $0 [OPTION]... [VAR=VALUE]... 1264Usage: $0 [OPTION]... [VAR=VALUE]...
1265 1265
@@ -1320,7 +1320,7 @@ fi
1320 1320
1321if test -n "$ac_init_help"; then 1321if test -n "$ac_init_help"; then
1322 case $ac_init_help in 1322 case $ac_init_help in
1323 short | recursive ) echo "Configuration of firejail 0.9.44~rc1:";; 1323 short | recursive ) echo "Configuration of firejail 0.9.45:";;
1324 esac 1324 esac
1325 cat <<\_ACEOF 1325 cat <<\_ACEOF
1326 1326
@@ -1424,7 +1424,7 @@ fi
1424test -n "$ac_init_help" && exit $ac_status 1424test -n "$ac_init_help" && exit $ac_status
1425if $ac_init_version; then 1425if $ac_init_version; then
1426 cat <<\_ACEOF 1426 cat <<\_ACEOF
1427firejail configure 0.9.44~rc1 1427firejail configure 0.9.45
1428generated by GNU Autoconf 2.69 1428generated by GNU Autoconf 2.69
1429 1429
1430Copyright (C) 2012 Free Software Foundation, Inc. 1430Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1726,7 +1726,7 @@ cat >config.log <<_ACEOF
1726This file contains any messages produced by compilers while 1726This file contains any messages produced by compilers while
1727running configure, to aid debugging if configure makes a mistake. 1727running configure, to aid debugging if configure makes a mistake.
1728 1728
1729It was created by firejail $as_me 0.9.44~rc1, which was 1729It was created by firejail $as_me 0.9.45, which was
1730generated by GNU Autoconf 2.69. Invocation command line was 1730generated by GNU Autoconf 2.69. Invocation command line was
1731 1731
1732 $ $0 $@ 1732 $ $0 $@
@@ -4303,7 +4303,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4303# report actual input values of CONFIG_FILES etc. instead of their 4303# report actual input values of CONFIG_FILES etc. instead of their
4304# values after options handling. 4304# values after options handling.
4305ac_log=" 4305ac_log="
4306This file was extended by firejail $as_me 0.9.44~rc1, which was 4306This file was extended by firejail $as_me 0.9.45, which was
4307generated by GNU Autoconf 2.69. Invocation command line was 4307generated by GNU Autoconf 2.69. Invocation command line was
4308 4308
4309 CONFIG_FILES = $CONFIG_FILES 4309 CONFIG_FILES = $CONFIG_FILES
@@ -4357,7 +4357,7 @@ _ACEOF
4357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 4357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4358ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 4358ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
4359ac_cs_version="\\ 4359ac_cs_version="\\
4360firejail config.status 0.9.44~rc1 4360firejail config.status 0.9.45
4361configured by $0, generated by GNU Autoconf 2.69, 4361configured by $0, generated by GNU Autoconf 2.69,
4362 with options \\"\$ac_cs_config\\" 4362 with options \\"\$ac_cs_config\\"
4363 4363
diff --git a/configure.ac b/configure.ac
index 108b558d4..95947a8e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
1AC_PREREQ([2.68]) 1AC_PREREQ([2.68])
2AC_INIT(firejail, 0.9.44~rc1, netblue30@yahoo.com, , http://firejail.wordpress.com) 2AC_INIT(firejail, 0.9.45, netblue30@yahoo.com, , http://firejail.wordpress.com)
3AC_CONFIG_SRCDIR([src/firejail/main.c]) 3AC_CONFIG_SRCDIR([src/firejail/main.c])
4#AC_CONFIG_HEADERS([config.h]) 4#AC_CONFIG_HEADERS([config.h])
5 5
diff --git a/etc/atom-beta.profile b/etc/atom-beta.profile
index 9a8d93875..fa0b316bb 100644
--- a/etc/atom-beta.profile
+++ b/etc/atom-beta.profile
@@ -8,8 +8,8 @@ include /etc/firejail/disable-passwdmgr.inc
8 8
9caps.drop all 9caps.drop all
10netfilter 10netfilter
11nonewprivs
12nogroups 11nogroups
12nonewprivs
13noroot 13noroot
14nosound 14nosound
15protocol unix,inet,inet6,netlink 15protocol unix,inet,inet6,netlink
diff --git a/etc/atom.profile b/etc/atom.profile
index 3cb86847e..61930d5c1 100644
--- a/etc/atom.profile
+++ b/etc/atom.profile
@@ -8,8 +8,8 @@ include /etc/firejail/disable-passwdmgr.inc
8 8
9caps.drop all 9caps.drop all
10netfilter 10netfilter
11nonewprivs
12nogroups 11nogroups
12nonewprivs
13noroot 13noroot
14nosound 14nosound
15protocol unix,inet,inet6,netlink 15protocol unix,inet,inet6,netlink
diff --git a/etc/atril.profile b/etc/atril.profile
index d9e10b072..fbcca0c1b 100644
--- a/etc/atril.profile
+++ b/etc/atril.profile
@@ -7,8 +7,8 @@ include /etc/firejail/disable-devel.inc
7include /etc/firejail/disable-passwdmgr.inc 7include /etc/firejail/disable-passwdmgr.inc
8 8
9caps.drop all 9caps.drop all
10nonewprivs
11nogroups 10nogroups
11nonewprivs
12noroot 12noroot
13nosound 13nosound
14protocol unix 14protocol unix
diff --git a/etc/audacity.profile b/etc/audacity.profile
index be3fac9be..827fa4301 100644
--- a/etc/audacity.profile
+++ b/etc/audacity.profile
@@ -8,8 +8,8 @@ include /etc/firejail/disable-programs.inc
8 8
9caps.drop all 9caps.drop all
10netfilter 10netfilter
11nonewprivs
12nogroups 11nogroups
12nonewprivs
13noroot 13noroot
14protocol unix 14protocol unix
15seccomp 15seccomp
diff --git a/etc/aweather.profile b/etc/aweather.profile
index 4e5c36f50..fa8654f1e 100644
--- a/etc/aweather.profile
+++ b/etc/aweather.profile
@@ -11,8 +11,8 @@ whitelist ~/.config/aweather
11 11
12caps.drop all 12caps.drop all
13netfilter 13netfilter
14nonewprivs
15nogroups 14nogroups
15nonewprivs
16noroot 16noroot
17nosound 17nosound
18protocol unix,inet,inet6 18protocol unix,inet,inet6
diff --git a/etc/cherrytree.profile b/etc/cherrytree.profile
index ec6d0d69d..139dec8ec 100644
--- a/etc/cherrytree.profile
+++ b/etc/cherrytree.profile
@@ -9,11 +9,10 @@ include /etc/firejail/disable-passwdmgr.inc
9 9
10caps.drop all 10caps.drop all
11netfilter 11netfilter
12nogroups
12nonewprivs 13nonewprivs
13noroot 14noroot
14nosound 15nosound
15seccomp 16seccomp
16protocol unix,inet,inet6,netlink 17protocol unix,inet,inet6,netlink
17tracelog 18tracelog
18
19
diff --git a/etc/chromium.profile b/etc/chromium.profile
index 0d383aebf..4109af9a4 100644
--- a/etc/chromium.profile
+++ b/etc/chromium.profile
@@ -25,4 +25,7 @@ whitelist ~/keepassx.kdbx
25whitelist ~/.lastpass 25whitelist ~/.lastpass
26whitelist ~/.config/lastpass 26whitelist ~/.config/lastpass
27 27
28# specific to Arch
29whitelist ~/.config/chromium-flags.conf
30
28include /etc/firejail/whitelist-common.inc 31include /etc/firejail/whitelist-common.inc
diff --git a/etc/disable-common.inc b/etc/disable-common.inc
index 19a23d764..82398473d 100644
--- a/etc/disable-common.inc
+++ b/etc/disable-common.inc
@@ -137,6 +137,11 @@ blacklist /etc/gshadow+
137blacklist /etc/ssh 137blacklist /etc/ssh
138blacklist /var/backup 138blacklist /var/backup
139 139
140# system directories
141blacklist /sbin
142blacklist /usr/sbin
143blacklist /usr/local/sbin
144
140# system management 145# system management
141# blacklist ${PATH}/umount 146# blacklist ${PATH}/umount
142# blacklist ${PATH}/mount 147# blacklist ${PATH}/mount
@@ -149,11 +154,22 @@ blacklist ${PATH}/xev
149blacklist ${PATH}/strace 154blacklist ${PATH}/strace
150blacklist ${PATH}/nc 155blacklist ${PATH}/nc
151blacklist ${PATH}/ncat 156blacklist ${PATH}/ncat
152 157blacklist ${PATH}/gpasswd
153# system directories 158blacklist ${PATH}/newgidmap
154blacklist /sbin 159blacklist ${PATH}/newgrp
155blacklist /usr/sbin 160blacklist ${PATH}/newuidmap
156blacklist /usr/local/sbin 161blacklist ${PATH}/pkexec
162blacklist ${PATH}/sg
163blacklist ${PATH}/rsh
164blacklist ${PATH}/rlogin
165blacklist ${PATH}/rcp
166blacklist ${PATH}/crontab
167blacklist ${PATH}/ksu
168blacklist ${PATH}/chsh
169blacklist ${PATH}/chfn
170blacklist ${PATH}/chage
171blacklist ${PATH}/expiry
172blacklist ${PATH}/unix_chkpwd
157 173
158# prevent lxterminal connecting to an existing lxterminal session 174# prevent lxterminal connecting to an existing lxterminal session
159blacklist /tmp/.lxterminal-socket* 175blacklist /tmp/.lxterminal-socket*
@@ -173,28 +189,6 @@ blacklist ${PATH}/terminix
173blacklist ${PATH}/urxvtc 189blacklist ${PATH}/urxvtc
174blacklist ${PATH}/urxvtcd 190blacklist ${PATH}/urxvtcd
175 191
176# disable common suid programms 192# kernel files
177blacklist ${PATH}/firejail 193blacklist /vmlinuz*
178blacklist ${PATH}/sudo 194blacklist /initrd*
179blacklist ${PATH}/su
180blacklist ${PATH}/mount
181blacklist ${PATH}/umount
182blacklist ${PATH}/fusermount
183blacklist ${PATH}/passwd
184blacklist ${PATH}/gpasswd
185blacklist ${PATH}/newgidmap
186blacklist ${PATH}/newgrp
187blacklist ${PATH}/newuidmap
188blacklist ${PATH}/pkexec
189blacklist ${PATH}/sg
190blacklist ${PATH}/rsh
191blacklist ${PATH}/rlogin
192blacklist ${PATH}/rcp
193blacklist ${PATH}/crontab
194blacklist ${PATH}/ksu
195blacklist ${PATH}/chsh
196blacklist ${PATH}/chfn
197blacklist ${PATH}/chage
198blacklist ${PATH}/expiry
199blacklist ${PATH}/ping
200blacklist ${PATH}/unix_chkpwd
diff --git a/etc/disable-devel.inc b/etc/disable-devel.inc
index 971857710..2ac367f37 100644
--- a/etc/disable-devel.inc
+++ b/etc/disable-devel.inc
@@ -20,7 +20,7 @@ blacklist /usr/bin/x86_64-unknown-linux-gnu-gcc*
20# clang/llvm 20# clang/llvm
21blacklist /usr/bin/clang* 21blacklist /usr/bin/clang*
22blacklist /usr/bin/llvm* 22blacklist /usr/bin/llvm*
23blacklist /usb/bin/lldb* 23blacklist /usr/bin/lldb*
24blacklist /usr/lib/llvm* 24blacklist /usr/lib/llvm*
25 25
26# tcc - Tiny C Compiler 26# tcc - Tiny C Compiler
diff --git a/etc/disable-programs.inc b/etc/disable-programs.inc
index 369e4813c..6e22fe04d 100644
--- a/etc/disable-programs.inc
+++ b/etc/disable-programs.inc
@@ -7,6 +7,8 @@ blacklist ${HOME}/.wine
7blacklist ${HOME}/.Mathematica 7blacklist ${HOME}/.Mathematica
8blacklist ${HOME}/.Wolfram Research 8blacklist ${HOME}/.Wolfram Research
9blacklist ${HOME}/.stellarium 9blacklist ${HOME}/.stellarium
10blacklist ${HOME}/.sword
11blacklist ${HOME}/.xiphos
10blacklist ${HOME}/.config/Atom 12blacklist ${HOME}/.config/Atom
11blacklist ${HOME}/.config/gthumb 13blacklist ${HOME}/.config/gthumb
12blacklist ${HOME}/.config/mupen64plus 14blacklist ${HOME}/.config/mupen64plus
@@ -35,6 +37,11 @@ blacklist ${HOME}/.gimp*
35blacklist ${HOME}/.config/zathura 37blacklist ${HOME}/.config/zathura
36blacklist ${HOME}/.config/cherrytree 38blacklist ${HOME}/.config/cherrytree
37blacklist ${HOME}/.xpdfrc 39blacklist ${HOME}/.xpdfrc
40blacklist ${HOME}/.openshot
41blacklist ${HOME}/.openshot_qt
42blacklist ${HOME}/.flowblade
43blacklist ${HOME}/.config/flowblade
44blacklist ${HOME}/.config/eog
38 45
39 46
40# Media players 47# Media players
@@ -72,8 +79,12 @@ blacklist ${HOME}/.8pecxstudios
72blacklist ${HOME}/.config/brave 79blacklist ${HOME}/.config/brave
73blacklist ${HOME}/.config/inox 80blacklist ${HOME}/.config/inox
74blacklist ${HOME}/.muttrc 81blacklist ${HOME}/.muttrc
82blacklist ${HOME}/.mutt
75blacklist ${HOME}/.mutt/muttrc 83blacklist ${HOME}/.mutt/muttrc
76blacklist ${HOME}/.msmtprc 84blacklist ${HOME}/.msmtprc
85blacklist ${HOME}/.config/evolution
86blacklist ${HOME}/.local/share/evolution
87blacklist ${HOME}/.cache/evolution
77 88
78# Instant Messaging 89# Instant Messaging
79blacklist ${HOME}/.config/hexchat 90blacklist ${HOME}/.config/hexchat
diff --git a/etc/eog.profile b/etc/eog.profile
index 32b54a042..7eb7fd127 100644
--- a/etc/eog.profile
+++ b/etc/eog.profile
@@ -9,9 +9,9 @@ include /etc/firejail/disable-passwdmgr.inc
9 9
10caps.drop all 10caps.drop all
11netfilter 11netfilter
12nogroups
12nonewprivs 13nonewprivs
13noroot 14noroot
14nogroups
15protocol unix 15protocol unix
16seccomp 16seccomp
17shell none 17shell none
@@ -20,4 +20,3 @@ private-bin eog
20private-dev 20private-dev
21private-etc fonts 21private-etc fonts
22private-tmp 22private-tmp
23
diff --git a/etc/evolution.profile b/etc/evolution.profile
index cf581643d..d097c0f34 100644
--- a/etc/evolution.profile
+++ b/etc/evolution.profile
@@ -14,9 +14,9 @@ include /etc/firejail/disable-passwdmgr.inc
14 14
15caps.drop all 15caps.drop all
16netfilter 16netfilter
17nogroups
17nonewprivs 18nonewprivs
18noroot 19noroot
19nogroups
20protocol unix,inet,inet6 20protocol unix,inet,inet6
21seccomp 21seccomp
22shell none 22shell none
diff --git a/etc/feh.profile b/etc/feh.profile
index 5fcb6bf25..e3b1ec528 100644
--- a/etc/feh.profile
+++ b/etc/feh.profile
@@ -5,14 +5,14 @@ include /etc/firejail/disable-devel.inc
5include /etc/firejail/disable-passwdmgr.inc 5include /etc/firejail/disable-passwdmgr.inc
6 6
7caps.drop all 7caps.drop all
8seccomp
9protocol unix
10netfilter 8netfilter
11net none 9net none
10nogroups
12nonewprivs 11nonewprivs
13noroot 12noroot
14nogroups
15nosound 13nosound
14protocol unix
15seccomp
16shell none 16shell none
17 17
18private-bin feh 18private-bin feh
diff --git a/etc/file.profile b/etc/file.profile
index 2e54030b1..199a97fad 100644
--- a/etc/file.profile
+++ b/etc/file.profile
@@ -1,16 +1,17 @@
1# file profile 1# file profile
2quiet
3ignore noroot 2ignore noroot
4include /etc/firejail/default.profile 3include /etc/firejail/default.profile
5 4
6tracelog 5blacklist /tmp/.X11-unix
6
7hostname file
7net none 8net none
9no3d
10nosound
11quiet
8shell none 12shell none
13tracelog
14
15private-dev
9private-bin file 16private-bin file
10private-etc magic.mgc,magic,localtime 17private-etc magic.mgc,magic,localtime
11hostname file
12private-dev
13nosound
14no3d
15blacklist /tmp/.X11-unix
16
diff --git a/etc/filezilla.profile b/etc/filezilla.profile
index 551c17a78..fe1d9d20d 100644
--- a/etc/filezilla.profile
+++ b/etc/filezilla.profile
@@ -13,10 +13,9 @@ noroot
13nosound 13nosound
14protocol unix,inet,inet6 14protocol unix,inet,inet6
15seccomp 15seccomp
16
17shell none 16shell none
17
18private-bin filezilla,uname,sh,python,lsb_release,fzputtygen,fzsftp 18private-bin filezilla,uname,sh,python,lsb_release,fzputtygen,fzsftp
19whitelist /tmp/.X11-unix
20private-dev 19private-dev
21nosound
22 20
21whitelist /tmp/.X11-unix
diff --git a/etc/flowblade.profile b/etc/flowblade.profile
new file mode 100644
index 000000000..12afdb0aa
--- /dev/null
+++ b/etc/flowblade.profile
@@ -0,0 +1,13 @@
1# FlowBlade profile
2noblacklist ${HOME}/.flowblade
3noblacklist ${HOME}/.config/flowblade
4include /etc/firejail/disable-common.inc
5include /etc/firejail/disable-programs.inc
6include /etc/firejail/disable-passwdmgr.inc
7
8caps.drop all
9netfilter
10nonewprivs
11noroot
12protocol unix,inet,inet6,netlink
13seccomp
diff --git a/etc/franz.profile b/etc/franz.profile
index 3cb7942ab..0b3be551b 100644
--- a/etc/franz.profile
+++ b/etc/franz.profile
@@ -6,12 +6,12 @@ include /etc/firejail/disable-programs.inc
6include /etc/firejail/disable-devel.inc 6include /etc/firejail/disable-devel.inc
7 7
8caps.drop all 8caps.drop all
9seccomp
10protocol unix,inet,inet6,netlink
11netfilter 9netfilter
12#tracelog
13nonewprivs 10nonewprivs
14noroot 11noroot
12protocol unix,inet,inet6,netlink
13seccomp
14#tracelog
15 15
16whitelist ${DOWNLOADS} 16whitelist ${DOWNLOADS}
17mkdir ~/.config/Franz 17mkdir ~/.config/Franz
diff --git a/etc/gajim.profile b/etc/gajim.profile
index 04902a734..809378ef9 100644
--- a/etc/gajim.profile
+++ b/etc/gajim.profile
@@ -22,8 +22,8 @@ include /etc/firejail/disable-devel.inc
22 22
23caps.drop all 23caps.drop all
24netfilter 24netfilter
25nonewprivs
26nogroups 25nogroups
26nonewprivs
27noroot 27noroot
28protocol unix,inet,inet6 28protocol unix,inet,inet6
29seccomp 29seccomp
diff --git a/etc/gimp.profile b/etc/gimp.profile
index 23361b771..cb441fc9d 100644
--- a/etc/gimp.profile
+++ b/etc/gimp.profile
@@ -6,13 +6,15 @@ include /etc/firejail/disable-passwdmgr.inc
6 6
7caps.drop all 7caps.drop all
8netfilter 8netfilter
9nogroups
9nonewprivs 10nonewprivs
10noroot 11noroot
12nosound
11protocol unix 13protocol unix
12seccomp 14seccomp
13private-dev 15
14private-tmp
15noexec ${HOME} 16noexec ${HOME}
16noexec /tmp 17noexec /tmp
17nogroups 18
18nosound 19private-dev
20private-tmp
diff --git a/etc/git.profile b/etc/git.profile
index 2fb55377d..73122d347 100644
--- a/etc/git.profile
+++ b/etc/git.profile
@@ -12,15 +12,15 @@ include /etc/firejail/disable-common.inc
12include /etc/firejail/disable-programs.inc 12include /etc/firejail/disable-programs.inc
13include /etc/firejail/disable-passwdmgr.inc 13include /etc/firejail/disable-passwdmgr.inc
14 14
15quiet
16 15
17caps.drop all 16caps.drop all
18netfilter 17netfilter
18nogroups
19nonewprivs 19nonewprivs
20noroot 20noroot
21nogroups
22nosound 21nosound
23protocol unix,inet,inet6 22protocol unix,inet,inet6
23quiet
24seccomp 24seccomp
25shell none 25shell none
26 26
diff --git a/etc/gpredict.profile b/etc/gpredict.profile
index 353ecceae..801304c18 100644
--- a/etc/gpredict.profile
+++ b/etc/gpredict.profile
@@ -6,13 +6,12 @@ include /etc/firejail/disable-passwdmgr.inc
6include /etc/firejail/disable-programs.inc 6include /etc/firejail/disable-programs.inc
7 7
8# Whitelist 8# Whitelist
9mkdir ~/.config/Gpredict
10whitelist ~/.config/Gpredict 9whitelist ~/.config/Gpredict
11 10
12caps.drop all 11caps.drop all
13netfilter 12netfilter
14nonewprivs
15nogroups 13nogroups
14nonewprivs
16noroot 15noroot
17nosound 16nosound
18protocol unix,inet,inet6 17protocol unix,inet,inet6
@@ -21,5 +20,6 @@ shell none
21tracelog 20tracelog
22 21
23private-bin gpredict 22private-bin gpredict
23private-etc fonts,resolv.conf
24private-dev 24private-dev
25private-tmp 25private-tmp
diff --git a/etc/gwenview.profile b/etc/gwenview.profile
index 67f10c4e1..c866c9e63 100644
--- a/etc/gwenview.profile
+++ b/etc/gwenview.profile
@@ -7,14 +7,15 @@ include /etc/firejail/disable-devel.inc
7include /etc/firejail/disable-passwdmgr.inc 7include /etc/firejail/disable-passwdmgr.inc
8 8
9caps.drop all 9caps.drop all
10nogroups
10nonewprivs 11nonewprivs
11noroot 12noroot
12nogroups
13private-dev
14protocol unix 13protocol unix
15seccomp 14seccomp
16nosound 15nosound
17 16
17private-dev
18
18#Experimental: 19#Experimental:
19#shell none 20#shell none
20#private-bin gwenview 21#private-bin gwenview
diff --git a/etc/gzip.profile b/etc/gzip.profile
index 5e73969c4..d51b9a951 100644
--- a/etc/gzip.profile
+++ b/etc/gzip.profile
@@ -1,12 +1,14 @@
1# gzip profile 1# gzip profile
2quiet
3ignore noroot 2ignore noroot
4include /etc/firejail/default.profile 3include /etc/firejail/default.profile
5tracelog 4
6net none
7shell none
8blacklist /tmp/.X11-unix 5blacklist /tmp/.X11-unix
9private-dev 6
10nosound 7net none
11no3d 8no3d
9nosound
10quiet
11shell none
12tracelog
12 13
14private-dev
diff --git a/etc/inkscape.profile b/etc/inkscape.profile
index cf885fba2..a0e86b6c9 100644
--- a/etc/inkscape.profile
+++ b/etc/inkscape.profile
@@ -6,13 +6,15 @@ include /etc/firejail/disable-passwdmgr.inc
6 6
7caps.drop all 7caps.drop all
8netfilter 8netfilter
9nogroups
9nonewprivs 10nonewprivs
10noroot 11noroot
12nosound
11protocol unix 13protocol unix
12seccomp 14seccomp
13private-dev 15
14private-tmp
15noexec ${HOME} 16noexec ${HOME}
16noexec /tmp 17noexec /tmp
17nogroups 18
18nosound 19private-dev
20private-tmp
diff --git a/etc/jitsi.profile b/etc/jitsi.profile
index c61158f8b..046499abe 100644
--- a/etc/jitsi.profile
+++ b/etc/jitsi.profile
@@ -6,8 +6,8 @@ include /etc/firejail/disable-passwdmgr.inc
6include /etc/firejail/disable-programs.inc 6include /etc/firejail/disable-programs.inc
7 7
8caps.drop all 8caps.drop all
9nonewprivs
10nogroups 9nogroups
10nonewprivs
11noroot 11noroot
12protocol unix,inet,inet6 12protocol unix,inet,inet6
13seccomp 13seccomp
diff --git a/etc/kmail.profile b/etc/kmail.profile
index 8c8fd18c4..bc21ba604 100644
--- a/etc/kmail.profile
+++ b/etc/kmail.profile
@@ -8,8 +8,8 @@ include /etc/firejail/disable-passwdmgr.inc
8 8
9caps.drop all 9caps.drop all
10netfilter 10netfilter
11nonewprivs
12nogroups 11nogroups
12nonewprivs
13noroot 13noroot
14protocol unix,inet,inet6,netlink 14protocol unix,inet,inet6,netlink
15seccomp 15seccomp
diff --git a/etc/less.profile b/etc/less.profile
index 6dfae027e..08758aead 100644
--- a/etc/less.profile
+++ b/etc/less.profile
@@ -2,8 +2,10 @@
2quiet 2quiet
3ignore noroot 3ignore noroot
4include /etc/firejail/default.profile 4include /etc/firejail/default.profile
5tracelog 5
6net none 6net none
7nosound
7shell none 8shell none
9tracelog
10
8private-dev 11private-dev
9nosound
diff --git a/etc/luminance-hdr.profile b/etc/luminance-hdr.profile
index 6e059ea52..76e864e0c 100644
--- a/etc/luminance-hdr.profile
+++ b/etc/luminance-hdr.profile
@@ -5,17 +5,19 @@ include /etc/firejail/disable-programs.inc
5include /etc/firejail/disable-passwdmgr.inc 5include /etc/firejail/disable-passwdmgr.inc
6 6
7caps.drop all 7caps.drop all
8ipc-namespace
8netfilter 9netfilter
9protocol unix 10nogroups
10nonewprivs 11nonewprivs
11noroot 12noroot
13nosound
14protocol unix
12seccomp 15seccomp
13shell none 16shell none
14tracelog 17tracelog
15private-tmp 18
16private-dev
17noexec ${HOME} 19noexec ${HOME}
18noexec /tmp 20noexec /tmp
19nogroups 21
20nosound 22private-tmp
21ipc-namespace 23private-dev
diff --git a/etc/mutt.profile b/etc/mutt.profile
index cda7fc4bf..b532ded67 100644
--- a/etc/mutt.profile
+++ b/etc/mutt.profile
@@ -2,6 +2,7 @@
2 2
3noblacklist ~/.muttrc 3noblacklist ~/.muttrc
4noblacklist ~/.mutt 4noblacklist ~/.mutt
5noblacklist ~/.mutt/muttrc
5noblacklist ~/.mailcap 6noblacklist ~/.mailcap
6noblacklist ~/.gnupg 7noblacklist ~/.gnupg
7noblacklist ~/.mail 8noblacklist ~/.mail
diff --git a/etc/okular.profile b/etc/okular.profile
index df142ccfc..b43a5fbea 100644
--- a/etc/okular.profile
+++ b/etc/okular.profile
@@ -9,14 +9,15 @@ include /etc/firejail/disable-devel.inc
9include /etc/firejail/disable-passwdmgr.inc 9include /etc/firejail/disable-passwdmgr.inc
10 10
11caps.drop all 11caps.drop all
12nonewprivs
13nogroups 12nogroups
13nonewprivs
14noroot 14noroot
15private-dev
16protocol unix 15protocol unix
17seccomp 16seccomp
18nosound 17nosound
19 18
19private-dev
20
20#Experimental: 21#Experimental:
21#net none 22#net none
22#shell none 23#shell none
diff --git a/etc/openshot.profile b/etc/openshot.profile
new file mode 100644
index 000000000..f12bd7d11
--- /dev/null
+++ b/etc/openshot.profile
@@ -0,0 +1,13 @@
1# OpenShot profile
2noblacklist ${HOME}/.openshot
3noblacklist ${HOME}/.openshot_qt
4include /etc/firejail/disable-common.inc
5include /etc/firejail/disable-programs.inc
6include /etc/firejail/disable-passwdmgr.inc
7
8caps.drop all
9netfilter
10nonewprivs
11noroot
12protocol unix,inet,inet6,netlink
13seccomp
diff --git a/etc/pidgin.profile b/etc/pidgin.profile
index 47be2b6ea..850706145 100644
--- a/etc/pidgin.profile
+++ b/etc/pidgin.profile
@@ -8,8 +8,8 @@ include /etc/firejail/disable-programs.inc
8 8
9caps.drop all 9caps.drop all
10netfilter 10netfilter
11nonewprivs
12nogroups 11nogroups
12nonewprivs
13noroot 13noroot
14protocol unix,inet,inet6 14protocol unix,inet,inet6
15seccomp 15seccomp
diff --git a/etc/pix.profile b/etc/pix.profile
index 80c05fd09..e21ddadc6 100644
--- a/etc/pix.profile
+++ b/etc/pix.profile
@@ -8,8 +8,8 @@ include /etc/firejail/disable-devel.inc
8include /etc/firejail/disable-passwdmgr.inc 8include /etc/firejail/disable-passwdmgr.inc
9 9
10caps.drop all 10caps.drop all
11nonewprivs
12nogroups 11nogroups
12nonewprivs
13noroot 13noroot
14nosound 14nosound
15protocol unix 15protocol unix
@@ -20,4 +20,3 @@ tracelog
20private-bin pix 20private-bin pix
21whitelist /tmp/.X11-unix 21whitelist /tmp/.X11-unix
22private-dev 22private-dev
23
diff --git a/etc/psi-plus.profile b/etc/psi-plus.profile
index 22c5bafc5..a9323448b 100644
--- a/etc/psi-plus.profile
+++ b/etc/psi-plus.profile
@@ -14,10 +14,10 @@ whitelist ~/.local/share/psi+
14mkdir ~/.cache/psi+ 14mkdir ~/.cache/psi+
15whitelist ~/.cache/psi+ 15whitelist ~/.cache/psi+
16 16
17include /etc/firejail/whitelist-common.inc
18
19caps.drop all 17caps.drop all
20netfilter 18netfilter
21noroot 19noroot
22protocol unix,inet,inet6 20protocol unix,inet,inet6
23seccomp 21seccomp
22
23include /etc/firejail/whitelist-common.inc
diff --git a/etc/qbittorrent.profile b/etc/qbittorrent.profile
index 138b6db55..67829c9ca 100644
--- a/etc/qbittorrent.profile
+++ b/etc/qbittorrent.profile
@@ -15,6 +15,6 @@ seccomp
15# there are some problems with "Open destination folder", see bug #536 15# there are some problems with "Open destination folder", see bug #536
16#shell none 16#shell none
17#private-bin qbittorrent 17#private-bin qbittorrent
18whitelist /tmp/.X11-unix
19private-dev 18private-dev
20nosound 19
20whitelist /tmp/.X11-unix
diff --git a/etc/qpdfview.profile b/etc/qpdfview.profile
index 07ea173e6..06c0db206 100644
--- a/etc/qpdfview.profile
+++ b/etc/qpdfview.profile
@@ -18,5 +18,5 @@ shell none
18tracelog 18tracelog
19 19
20private-bin qpdfview 20private-bin qpdfview
21private-tmp
22private-dev 21private-dev
22private-tmp
diff --git a/etc/qtox.profile b/etc/qtox.profile
index 927487037..81d8aa10e 100644
--- a/etc/qtox.profile
+++ b/etc/qtox.profile
@@ -11,8 +11,8 @@ whitelist ${DOWNLOADS}
11 11
12caps.drop all 12caps.drop all
13netfilter 13netfilter
14nonewprivs
15nogroups 14nogroups
15nonewprivs
16noroot 16noroot
17protocol unix,inet,inet6 17protocol unix,inet,inet6
18seccomp 18seccomp
diff --git a/etc/quiterss.profile b/etc/quiterss.profile
index 2ab5d8a8e..2b28fce73 100644
--- a/etc/quiterss.profile
+++ b/etc/quiterss.profile
@@ -14,16 +14,17 @@ whitelist ${HOME}/.cache/QuiteRss
14 14
15caps.drop all 15caps.drop all
16netfilter 16netfilter
17nonewprivs
18nogroups 17nogroups
18nonewprivs
19noroot 19noroot
20private-bin quiterss
21private-dev
22nosound 20nosound
23#private-etc X11,ssl
24protocol unix,inet,inet6 21protocol unix,inet,inet6
25seccomp 22seccomp
26shell none 23shell none
27tracelog 24tracelog
28 25
26private-bin quiterss
27private-dev
28#private-etc X11,ssl
29
29include /etc/firejail/whitelist-common.inc 30include /etc/firejail/whitelist-common.inc
diff --git a/etc/ranger.profile b/etc/ranger.profile
index a040cd6bc..323e64dee 100644
--- a/etc/ranger.profile
+++ b/etc/ranger.profile
@@ -12,13 +12,12 @@ include /etc/firejail/disable-passwdmgr.inc
12caps.drop all 12caps.drop all
13netfilter 13netfilter
14net none 14net none
15nogroups
15nonewprivs 16nonewprivs
16noroot 17noroot
17nogroups
18protocol unix 18protocol unix
19seccomp 19seccomp
20nosound 20nosound
21 21
22private-tmp 22private-tmp
23private-dev 23private-dev
24
diff --git a/etc/rhythmbox.profile b/etc/rhythmbox.profile
index 0e8527ae7..e5e192486 100644
--- a/etc/rhythmbox.profile
+++ b/etc/rhythmbox.profile
@@ -5,8 +5,8 @@ include /etc/firejail/disable-devel.inc
5include /etc/firejail/disable-passwdmgr.inc 5include /etc/firejail/disable-passwdmgr.inc
6 6
7caps.drop all 7caps.drop all
8nogroups
9netfilter 8netfilter
9nogroups
10nonewprivs 10nonewprivs
11noroot 11noroot
12protocol unix,inet,inet6 12protocol unix,inet,inet6
diff --git a/etc/rtorrent.profile b/etc/rtorrent.profile
index 15df2c374..1226a51cd 100644
--- a/etc/rtorrent.profile
+++ b/etc/rtorrent.profile
@@ -16,4 +16,3 @@ shell none
16private-bin rtorrent 16private-bin rtorrent
17whitelist /tmp/.X11-unix 17whitelist /tmp/.X11-unix
18private-dev 18private-dev
19nosound
diff --git a/etc/server.profile b/etc/server.profile
index 22cef0a3c..b8a34feb2 100644
--- a/etc/server.profile
+++ b/etc/server.profile
@@ -6,11 +6,12 @@ include /etc/firejail/disable-common.inc
6include /etc/firejail/disable-programs.inc 6include /etc/firejail/disable-programs.inc
7include /etc/firejail/disable-passwdmgr.inc 7include /etc/firejail/disable-passwdmgr.inc
8 8
9private
10private-dev
11nosound
12no3d
13private-tmp
14blacklist /tmp/.X11-unix 9blacklist /tmp/.X11-unix
10
11no3d
12nosound
15seccomp 13seccomp
16 14
15private
16private-dev
17private-tmp
diff --git a/etc/slack.profile b/etc/slack.profile
index 1009f7ee0..a85a28f03 100644
--- a/etc/slack.profile
+++ b/etc/slack.profile
@@ -1,3 +1,4 @@
1# Firejail profile for Slack
1noblacklist ${HOME}/.config/Slack 2noblacklist ${HOME}/.config/Slack
2noblacklist ${HOME}/Downloads 3noblacklist ${HOME}/Downloads
3 4
@@ -6,25 +7,25 @@ include /etc/firejail/disable-programs.inc
6include /etc/firejail/disable-devel.inc 7include /etc/firejail/disable-devel.inc
7include /etc/firejail/disable-passwdmgr.inc 8include /etc/firejail/disable-passwdmgr.inc
8 9
9mkdir ${HOME}/.config
10mkdir ${HOME}/.config/Slack
11whitelist ${HOME}/.config/Slack
12whitelist ${HOME}/Downloads
13
14protocol unix,inet,inet6,netlink
15private-dev
16private-tmp
17private-etc fonts,resolv.conf,ld.so.conf,ld.so.cache,localtime
18name slack
19blacklist /var 10blacklist /var
20 11
21include /etc/firejail/whitelist-common.inc
22
23caps.drop all 12caps.drop all
24seccomp 13name slack
25netfilter 14netfilter
26nonewprivs
27nogroups 15nogroups
16nonewprivs
28noroot 17noroot
18protocol unix,inet,inet6,netlink
19seccomp
29shell none 20shell none
21
30private-bin slack 22private-bin slack
23private-dev
24private-etc fonts,resolv.conf,ld.so.conf,ld.so.cache,localtime
25private-tmp
26
27mkdir ${HOME}/.config
28mkdir ${HOME}/.config/Slack
29whitelist ${HOME}/.config/Slack
30whitelist ${HOME}/Downloads
31include /etc/firejail/whitelist-common.inc
diff --git a/etc/spotify.profile b/etc/spotify.profile
index 73d427db3..6dbcc03ee 100644
--- a/etc/spotify.profile
+++ b/etc/spotify.profile
@@ -7,16 +7,13 @@ include /etc/firejail/disable-programs.inc
7include /etc/firejail/disable-devel.inc 7include /etc/firejail/disable-devel.inc
8include /etc/firejail/disable-passwdmgr.inc 8include /etc/firejail/disable-passwdmgr.inc
9 9
10# Whitelist the folders needed by Spotify - This is more restrictive 10# Whitelist the folders needed by Spotify
11# than a blacklist though, but this is all spotify requires for
12# streaming audio
13mkdir ${HOME}/.config/spotify 11mkdir ${HOME}/.config/spotify
14whitelist ${HOME}/.config/spotify 12whitelist ${HOME}/.config/spotify
15mkdir ${HOME}/.local/share/spotify 13mkdir ${HOME}/.local/share/spotify
16whitelist ${HOME}/.local/share/spotify 14whitelist ${HOME}/.local/share/spotify
17mkdir ${HOME}/.cache/spotify 15mkdir ${HOME}/.cache/spotify
18whitelist ${HOME}/.cache/spotify 16whitelist ${HOME}/.cache/spotify
19include /etc/firejail/whitelist-common.inc
20 17
21caps.drop all 18caps.drop all
22netfilter 19netfilter
@@ -27,5 +24,20 @@ protocol unix,inet,inet6,netlink
27seccomp 24seccomp
28shell none 25shell none
29 26
30#private-bin spotify 27private-bin spotify
28private-etc fonts,machine-id,pulse,resolv.conf
31private-dev 29private-dev
30private-tmp
31
32blacklist ${HOME}/.Xauthority
33blacklist ${HOME}/.bashrc
34blacklist /boot
35blacklist /lost+found
36blacklist /media
37blacklist /mnt
38blacklist /opt
39blacklist /root
40blacklist /sbin
41blacklist /srv
42blacklist /sys
43blacklist /var
diff --git a/etc/start-tor-browser.profile b/etc/start-tor-browser.profile
new file mode 100644
index 000000000..ee19cee25
--- /dev/null
+++ b/etc/start-tor-browser.profile
@@ -0,0 +1,20 @@
1# Firejail profile for the Tor Brower Bundle
2include /etc/firejail/disable-common.inc
3include /etc/firejail/disable-devel.inc
4include /etc/firejail/disable-passwdmgr.inc
5include /etc/firejail/disable-programs.inc
6
7caps.drop all
8netfilter
9nogroups
10nonewprivs
11noroot
12protocol unix,inet,inet6
13seccomp
14shell none
15tracelog
16
17private-bin bash,grep,sed,tail,env,gpg,id,readlink,dirname,test,mkdir,ln,sed,cp,rm,getconf
18private-etc fonts
19private-dev
20private-tmp
diff --git a/etc/strings.profile b/etc/strings.profile
index f99a65009..7c464bf88 100644
--- a/etc/strings.profile
+++ b/etc/strings.profile
@@ -1,10 +1,11 @@
1# strings profile 1# strings profile
2quiet
3ignore noroot 2ignore noroot
4include /etc/firejail/default.profile 3include /etc/firejail/default.profile
5tracelog 4
6net none 5net none
7shell none
8private-dev
9nosound 6nosound
7quiet
8shell none
9tracelog
10 10
11private-dev
diff --git a/etc/synfigstudio.profile b/etc/synfigstudio.profile
index d46467b99..69b2a0db2 100644
--- a/etc/synfigstudio.profile
+++ b/etc/synfigstudio.profile
@@ -11,7 +11,9 @@ nonewprivs
11noroot 11noroot
12protocol unix 12protocol unix
13seccomp 13seccomp
14private-dev 14
15private-tmp
16noexec ${HOME} 15noexec ${HOME}
17noexec /tmp 16noexec /tmp
17
18private-dev
19private-tmp
diff --git a/etc/tar.profile b/etc/tar.profile
index 663ac3805..91fdaf48d 100644
--- a/etc/tar.profile
+++ b/etc/tar.profile
@@ -1,18 +1,18 @@
1# tar profile 1# tar profile
2quiet
3ignore noroot 2ignore noroot
4include /etc/firejail/default.profile 3include /etc/firejail/default.profile
5 4
6tracelog 5blacklist /tmp/.X11-unix
6
7hostname tar
7net none 8net none
9no3d
10nosound
11quiet
8shell none 12shell none
13tracelog
9 14
10# support compressed archives 15# support compressed archives
11private-bin sh,tar,gtar,compress,gzip,lzma,xz,bzip2,lbzip2,lzip,lzop 16private-bin sh,tar,gtar,compress,gzip,lzma,xz,bzip2,lbzip2,lzip,lzop
12private-dev 17private-dev
13nosound
14no3d
15private-etc passwd,group,localtime 18private-etc passwd,group,localtime
16hostname tar
17blacklist /tmp/.X11-unix
18
diff --git a/etc/telegram.profile b/etc/telegram.profile
index 8e91e426b..7615c8eef 100644
--- a/etc/telegram.profile
+++ b/etc/telegram.profile
@@ -10,4 +10,3 @@ nonewprivs
10noroot 10noroot
11protocol unix,inet,inet6 11protocol unix,inet,inet6
12seccomp 12seccomp
13
diff --git a/etc/transmission-gtk.profile b/etc/transmission-gtk.profile
index 0cfa4fcfc..316cdfec6 100644
--- a/etc/transmission-gtk.profile
+++ b/etc/transmission-gtk.profile
@@ -18,6 +18,6 @@ shell none
18tracelog 18tracelog
19 19
20private-bin transmission-gtk 20private-bin transmission-gtk
21whitelist /tmp/.X11-unix
22private-dev 21private-dev
23 22
23whitelist /tmp/.X11-unix
diff --git a/etc/transmission-qt.profile b/etc/transmission-qt.profile
index 754211a63..51c58e224 100644
--- a/etc/transmission-qt.profile
+++ b/etc/transmission-qt.profile
@@ -14,9 +14,10 @@ noroot
14nosound 14nosound
15protocol unix,inet,inet6 15protocol unix,inet,inet6
16seccomp 16seccomp
17shell none
17tracelog 18tracelog
18 19
19shell none
20private-bin transmission-qt 20private-bin transmission-qt
21whitelist /tmp/.X11-unix
22private-dev 21private-dev
22
23whitelist /tmp/.X11-unix
diff --git a/etc/uget-gtk.profile b/etc/uget-gtk.profile
index 522b4bd1e..f42e6c69a 100644
--- a/etc/uget-gtk.profile
+++ b/etc/uget-gtk.profile
@@ -9,17 +9,16 @@ caps.drop all
9netfilter 9netfilter
10nonewprivs 10nonewprivs
11noroot 11noroot
12nosound
12protocol unix,inet,inet6 13protocol unix,inet,inet6
13seccomp 14seccomp
15shell none
14 16
17private-bin uget-gtk
18private-dev
19
20whitelist /tmp/.X11-unix
15whitelist ${DOWNLOADS} 21whitelist ${DOWNLOADS}
16mkdir ~/.config/uGet 22mkdir ~/.config/uGet
17whitelist ~/.config/uGet 23whitelist ~/.config/uGet
18include /etc/firejail/whitelist-common.inc 24include /etc/firejail/whitelist-common.inc
19
20shell none
21private-bin uget-gtk
22whitelist /tmp/.X11-unix
23private-dev
24nosound
25
diff --git a/etc/unrar.profile b/etc/unrar.profile
index f29d1b51b..0700cafe9 100644
--- a/etc/unrar.profile
+++ b/etc/unrar.profile
@@ -1,17 +1,18 @@
1# unrar profile 1# unrar profile
2quiet
3ignore noroot 2ignore noroot
4include /etc/firejail/default.profile 3include /etc/firejail/default.profile
5 4
6tracelog 5blacklist /tmp/.X11-unix
6
7hostname unrar
7net none 8net none
9no3d
10nosound
11quiet
8shell none 12shell none
13tracelog
14
9private-bin unrar 15private-bin unrar
10private-dev 16private-dev
11nosound
12no3d
13private-etc passwd,group,localtime 17private-etc passwd,group,localtime
14hostname unrar
15private-tmp 18private-tmp
16blacklist /tmp/.X11-unix
17
diff --git a/etc/unzip.profile b/etc/unzip.profile
index 07224855f..a43785795 100644
--- a/etc/unzip.profile
+++ b/etc/unzip.profile
@@ -1,16 +1,16 @@
1# unzip profile 1# unzip profile
2quiet
3ignore noroot 2ignore noroot
4include /etc/firejail/default.profile 3include /etc/firejail/default.profile
4blacklist /tmp/.X11-unix
5 5
6tracelog 6hostname unzip
7net none 7net none
8no3d
9nosound
10quiet
8shell none 11shell none
12tracelog
13
9private-bin unzip 14private-bin unzip
10private-etc passwd,group,localtime
11hostname unzip
12private-dev 15private-dev
13nosound 16private-etc passwd,group,localtime
14no3d
15blacklist /tmp/.X11-unix
16
diff --git a/etc/uudeview.profile b/etc/uudeview.profile
index 8ea9d5163..5ba0896ab 100644
--- a/etc/uudeview.profile
+++ b/etc/uudeview.profile
@@ -1,15 +1,15 @@
1# uudeview profile 1# uudeview profile
2quiet
3ignore noroot 2ignore noroot
4include /etc/firejail/default.profile 3include /etc/firejail/default.profile
5 4
6tracelog 5blacklist /etc
6
7hostname uudeview
7net none 8net none
9nosound
10quiet
8shell none 11shell none
12tracelog
13
9private-bin uudeview 14private-bin uudeview
10private-dev 15private-dev
11private-etc nonexisting_fakefile_for_empty_etc
12hostname uudeview
13nosound
14uudeview
15
diff --git a/etc/vim.profile b/etc/vim.profile
index 3c1fefe41..b161fcbb0 100644
--- a/etc/vim.profile
+++ b/etc/vim.profile
@@ -1,5 +1,4 @@
1# vim profile 1# vim profile
2
3noblacklist ~/.vim 2noblacklist ~/.vim
4noblacklist ~/.vimrc 3noblacklist ~/.vimrc
5noblacklist ~/.viminfo 4noblacklist ~/.viminfo
@@ -10,8 +9,8 @@ include /etc/firejail/disable-passwdmgr.inc
10 9
11caps.drop all 10caps.drop all
12netfilter 11netfilter
12nogroups
13nonewprivs 13nonewprivs
14noroot 14noroot
15nogroups
16protocol unix,inet,inet6 15protocol unix,inet,inet6
17seccomp 16seccomp
diff --git a/etc/virtualbox.profile b/etc/virtualbox.profile
new file mode 100644
index 000000000..148b7efc8
--- /dev/null
+++ b/etc/virtualbox.profile
@@ -0,0 +1,12 @@
1# VirtualBox profile
2
3noblacklist ${HOME}/.VirtualBox
4noblacklist ${HOME}/VirtualBox VMs
5noblacklist ${HOME}/.config/VirtualBox
6include /etc/firejail/disable-common.inc
7include /etc/firejail/disable-programs.inc
8include /etc/firejail/disable-passwdmgr.inc
9
10caps.drop all
11
12
diff --git a/etc/xiphos.profile b/etc/xiphos.profile
new file mode 100644
index 000000000..b7fb6ecf3
--- /dev/null
+++ b/etc/xiphos.profile
@@ -0,0 +1,30 @@
1# Firejail profile for xiphos
2noblacklist ~/.sword
3noblacklist ~/.xiphos
4
5include /etc/firejail/disable-common.inc
6include /etc/firejail/disable-devel.inc
7include /etc/firejail/disable-passwdmgr.inc
8include /etc/firejail/disable-programs.inc
9
10blacklist ~/.bashrc
11blacklist ~/.Xauthority
12
13caps.drop all
14netfilter
15nogroups
16nonewprivs
17noroot
18nosound
19protocol unix,inet,inet6
20seccomp
21shell none
22tracelog
23
24private-bin xiphos
25private-etc fonts,resolv.conf,sword
26private-dev
27private-tmp
28
29whitelist ${HOME}/.sword
30whitelist ${HOME}/.xiphos
diff --git a/etc/xpdf.profile b/etc/xpdf.profile
index e036fba21..7ea368bbe 100644
--- a/etc/xpdf.profile
+++ b/etc/xpdf.profile
@@ -7,15 +7,12 @@ include /etc/firejail/disable-programs.inc
7include /etc/firejail/disable-passwdmgr.inc 7include /etc/firejail/disable-passwdmgr.inc
8 8
9caps.drop all 9caps.drop all
10shell none 10net none
11nonewprivs 11nonewprivs
12noroot 12noroot
13protocol unix 13protocol unix
14shell none
14seccomp 15seccomp
16
15private-dev 17private-dev
16private-tmp 18private-tmp
17net none
18
19
20
21
diff --git a/etc/xplayer.profile b/etc/xplayer.profile
index 54d5ed89b..191d2f67f 100644
--- a/etc/xplayer.profile
+++ b/etc/xplayer.profile
@@ -9,8 +9,8 @@ include /etc/firejail/disable-passwdmgr.inc
9 9
10caps.drop all 10caps.drop all
11netfilter 11netfilter
12nonewprivs
13nogroups 12nogroups
13nonewprivs
14noroot 14noroot
15protocol unix,inet,inet6 15protocol unix,inet,inet6
16seccomp 16seccomp
diff --git a/etc/xzdec.profile b/etc/xzdec.profile
index a9d027c38..04f98cef6 100644
--- a/etc/xzdec.profile
+++ b/etc/xzdec.profile
@@ -1,12 +1,14 @@
1# xzdec profile 1# xzdec profile
2quiet
3ignore noroot 2ignore noroot
4include /etc/firejail/default.profile 3include /etc/firejail/default.profile
5tracelog 4
6net none
7shell none
8blacklist /tmp/.X11-unix 5blacklist /tmp/.X11-unix
9private-dev 6
10nosound 7net none
11no3d 8no3d
9nosound
10quiet
11shell none
12tracelog
12 13
14private-dev
diff --git a/etc/zathura.profile b/etc/zathura.profile
index 7093c52b2..ab2e99dbc 100644
--- a/etc/zathura.profile
+++ b/etc/zathura.profile
@@ -7,14 +7,14 @@ include /etc/firejail/disable-devel.inc
7include /etc/firejail/disable-passwdmgr.inc 7include /etc/firejail/disable-passwdmgr.inc
8 8
9caps.drop all 9caps.drop all
10seccomp
11protocol unix
12netfilter 10netfilter
11nogroups
13nonewprivs 12nonewprivs
14noroot 13noroot
15nogroups
16nosound 14nosound
17shell none 15shell none
16seccomp
17protocol unix
18 18
19private-bin zathura 19private-bin zathura
20private-dev 20private-dev
diff --git a/mkuid.sh b/mkuid.sh
index c95741043..a59f58143 100755
--- a/mkuid.sh
+++ b/mkuid.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/sh
2 2
3echo "extracting UID_MIN and GID_MIN" 3echo "extracting UID_MIN and GID_MIN"
4echo "#ifndef FIREJAIL_UIDS_H" > uids.h 4echo "#ifndef FIREJAIL_UIDS_H" > uids.h
diff --git a/platform/debian/conffiles b/platform/debian/conffiles
index a8ed6f691..0c2e85904 100644
--- a/platform/debian/conffiles
+++ b/platform/debian/conffiles
@@ -161,3 +161,10 @@
161/etc/firejail/emacs.profile 161/etc/firejail/emacs.profile
162/etc/firejail/vim.profile 162/etc/firejail/vim.profile
163/etc/firejail/xpdf.profile 163/etc/firejail/xpdf.profile
164/etc/firejail/virtualbox.profile
165/etc/firejail/openshot.profile
166/etc/firejail/flowblade.profile
167/etc/firejail/eog.profile
168/etc/firejail/evolution.profile
169/etc/firejail/start-tor-browser.profile
170/etc/firejail/xiphos.profile
diff --git a/platform/rpm/old-mkrpm.sh b/platform/rpm/old-mkrpm.sh
new file mode 100755
index 000000000..017d5e1c3
--- /dev/null
+++ b/platform/rpm/old-mkrpm.sh
@@ -0,0 +1,542 @@
1#!/bin/bash
2VERSION="0.9.44"
3rm -fr ~/rpmbuild
4rm -f firejail-$VERSION-1.x86_64.rpm
5
6mkdir -p ~/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}
7cat <<EOF >~/.rpmmacros
8%_topdir %(echo $HOME)/rpmbuild
9%_tmppath %{_topdir}/tmp
10EOF
11
12cd ~/rpmbuild
13echo "building directory tree"
14
15mkdir -p firejail-$VERSION/usr/bin
16install -m 755 /usr/bin/firejail firejail-$VERSION/usr/bin/.
17install -m 755 /usr/bin/firemon firejail-$VERSION/usr/bin/.
18install -m 755 /usr/bin/firecfg firejail-$VERSION/usr/bin/.
19
20mkdir -p firejail-$VERSION/usr/lib/firejail
21install -m 755 /usr/lib/firejail/faudit firejail-$VERSION/usr/lib/firejail/.
22install -m 644 /usr/lib/firejail/firecfg.config firejail-$VERSION/usr/lib/firejail/.
23install -m 755 /usr/lib/firejail/fshaper.sh firejail-$VERSION/usr/lib/firejail/.
24install -m 755 /usr/lib/firejail/ftee firejail-$VERSION/usr/lib/firejail/.
25install -m 644 /usr/lib/firejail/libtrace.so firejail-$VERSION/usr/lib/firejail/.
26install -m 644 /usr/lib/firejail/libtracelog.so firejail-$VERSION/usr/lib/firejail/.
27install -m 644 /usr/lib/firejail/libconnect.so firejail-$VERSION/usr/lib/firejail/.
28
29mkdir -p firejail-$VERSION/usr/share/man/man1
30install -m 644 /usr/share/man/man1/firejail.1.gz firejail-$VERSION/usr/share/man/man1/.
31install -m 644 /usr/share/man/man1/firemon.1.gz firejail-$VERSION/usr/share/man/man1/.
32install -m 644 /usr/share/man/man1/firecfg.1.gz firejail-$VERSION/usr/share/man/man1/.
33
34mkdir -p firejail-$VERSION/usr/share/man/man5
35install -m 644 /usr/share/man/man5/firejail-profile.5.gz firejail-$VERSION/usr/share/man/man5/.
36install -m 644 /usr/share/man/man5/firejail-login.5.gz firejail-$VERSION/usr/share/man/man5/.
37
38mkdir -p firejail-$VERSION/usr/share/doc/packages/firejail
39install -m 644 /usr/share/doc/firejail/COPYING firejail-$VERSION/usr/share/doc/packages/firejail/.
40install -m 644 /usr/share/doc/firejail/README firejail-$VERSION/usr/share/doc/packages/firejail/.
41install -m 644 /usr/share/doc/firejail/RELNOTES firejail-$VERSION/usr/share/doc/packages/firejail/.
42
43mkdir -p firejail-$VERSION/etc/firejail
44install -m 644 /etc/firejail/0ad.profile firejail-$VERSION/etc/firejail/.
45install -m 644 /etc/firejail/abrowser.profile firejail-$VERSION/etc/firejail/.
46install -m 644 /etc/firejail/atom-beta.profile firejail-$VERSION/etc/firejail/.
47install -m 644 /etc/firejail/atom.profile firejail-$VERSION/etc/firejail/.
48install -m 644 /etc/firejail/atril.profile firejail-$VERSION/etc/firejail/.
49install -m 644 /etc/firejail/audacious.profile firejail-$VERSION/etc/firejail/.
50install -m 644 /etc/firejail/audacity.profile firejail-$VERSION/etc/firejail/.
51install -m 644 /etc/firejail/aweather.profile firejail-$VERSION/etc/firejail/.
52install -m 644 /etc/firejail/bitlbee.profile firejail-$VERSION/etc/firejail/.
53install -m 644 /etc/firejail/brave.profile firejail-$VERSION/etc/firejail/.
54install -m 644 /etc/firejail/cherrytree.profile firejail-$VERSION/etc/firejail/.
55install -m 644 /etc/firejail/chromium-browser.profile firejail-$VERSION/etc/firejail/.
56install -m 644 /etc/firejail/chromium.profile firejail-$VERSION/etc/firejail/.
57install -m 644 /etc/firejail/clementine.profile firejail-$VERSION/etc/firejail/.
58install -m 644 /etc/firejail/cmus.profile firejail-$VERSION/etc/firejail/.
59install -m 644 /etc/firejail/conkeror.profile firejail-$VERSION/etc/firejail/.
60install -m 644 /etc/firejail/corebird.profile firejail-$VERSION/etc/firejail/.
61install -m 644 /etc/firejail/cpio.profile firejail-$VERSION/etc/firejail/.
62install -m 644 /etc/firejail/cyberfox.profile firejail-$VERSION/etc/firejail/.
63install -m 644 /etc/firejail/Cyberfox.profile firejail-$VERSION/etc/firejail/.
64install -m 644 /etc/firejail/deadbeef.profile firejail-$VERSION/etc/firejail/.
65install -m 644 /etc/firejail/default.profile firejail-$VERSION/etc/firejail/.
66install -m 644 /etc/firejail/deluge.profile firejail-$VERSION/etc/firejail/.
67install -m 644 /etc/firejail/dillo.profile firejail-$VERSION/etc/firejail/.
68install -m 644 /etc/firejail/disable-common.inc firejail-$VERSION/etc/firejail/.
69install -m 644 /etc/firejail/disable-devel.inc firejail-$VERSION/etc/firejail/.
70install -m 644 /etc/firejail/disable-passwdmgr.inc firejail-$VERSION/etc/firejail/.
71install -m 644 /etc/firejail/disable-programs.inc firejail-$VERSION/etc/firejail/.
72install -m 644 /etc/firejail/dnscrypt-proxy.profile firejail-$VERSION/etc/firejail/.
73install -m 644 /etc/firejail/dnsmasq.profile firejail-$VERSION/etc/firejail/.
74install -m 644 /etc/firejail/dosbox.profile firejail-$VERSION/etc/firejail/.
75install -m 644 /etc/firejail/dropbox.profile firejail-$VERSION/etc/firejail/.
76install -m 644 /etc/firejail/empathy.profile firejail-$VERSION/etc/firejail/.
77install -m 644 /etc/firejail/eom.profile firejail-$VERSION/etc/firejail/.
78install -m 644 /etc/firejail/epiphany.profile firejail-$VERSION/etc/firejail/.
79install -m 644 /etc/firejail/evince.profile firejail-$VERSION/etc/firejail/.
80install -m 644 /etc/firejail/fbreader.profile firejail-$VERSION/etc/firejail/.
81install -m 644 /etc/firejail/file.profile firejail-$VERSION/etc/firejail/.
82install -m 644 /etc/firejail/filezilla.profile firejail-$VERSION/etc/firejail/.
83install -m 644 /etc/firejail/firefox-esr.profile firejail-$VERSION/etc/firejail/.
84install -m 644 /etc/firejail/firefox.profile firejail-$VERSION/etc/firejail/.
85install -m 644 /etc/firejail/firejail.config firejail-$VERSION/etc/firejail/.
86install -m 644 /etc/firejail/flashpeak-slimjet.profile firejail-$VERSION/etc/firejail/.
87install -m 644 /etc/firejail/franz.profile firejail-$VERSION/etc/firejail/.
88install -m 644 /etc/firejail/gajim.profile firejail-$VERSION/etc/firejail/.
89install -m 644 /etc/firejail/gitter.profile firejail-$VERSION/etc/firejail/.
90install -m 644 /etc/firejail/gnome-chess.profile firejail-$VERSION/etc/firejail/.
91install -m 644 /etc/firejail/gnome-mplayer.profile firejail-$VERSION/etc/firejail/.
92install -m 644 /etc/firejail/google-chrome-beta.profile firejail-$VERSION/etc/firejail/.
93install -m 644 /etc/firejail/google-chrome.profile firejail-$VERSION/etc/firejail/.
94install -m 644 /etc/firejail/google-chrome-stable.profile firejail-$VERSION/etc/firejail/.
95install -m 644 /etc/firejail/google-chrome-unstable.profile firejail-$VERSION/etc/firejail/.
96install -m 644 /etc/firejail/google-play-music-desktop-player.profile firejail-$VERSION/etc/firejail/.
97install -m 644 /etc/firejail/gpredict.profile firejail-$VERSION/etc/firejail/.
98install -m 644 /etc/firejail/gtar.profile firejail-$VERSION/etc/firejail/.
99install -m 644 /etc/firejail/gthumb.profile firejail-$VERSION/etc/firejail/.
100install -m 644 /etc/firejail/gwenview.profile firejail-$VERSION/etc/firejail/.
101install -m 644 /etc/firejail/gzip.profile firejail-$VERSION/etc/firejail/.
102install -m 644 /etc/firejail/hedgewars.profile firejail-$VERSION/etc/firejail/.
103install -m 644 /etc/firejail/hexchat.profile firejail-$VERSION/etc/firejail/.
104install -m 644 /etc/firejail/icecat.profile firejail-$VERSION/etc/firejail/.
105install -m 644 /etc/firejail/icedove.profile firejail-$VERSION/etc/firejail/.
106install -m 644 /etc/firejail/iceweasel.profile firejail-$VERSION/etc/firejail/.
107install -m 644 /etc/firejail/inox.profile firejail-$VERSION/etc/firejail/.
108install -m 644 /etc/firejail/jitsi.profile firejail-$VERSION/etc/firejail/.
109install -m 644 /etc/firejail/kmail.profile firejail-$VERSION/etc/firejail/.
110install -m 644 /etc/firejail/konversation.profile firejail-$VERSION/etc/firejail/.
111install -m 644 /etc/firejail/less.profile firejail-$VERSION/etc/firejail/.
112install -m 644 /etc/firejail/libreoffice.profile firejail-$VERSION/etc/firejail/.
113install -m 644 /etc/firejail/localc.profile firejail-$VERSION/etc/firejail/.
114install -m 644 /etc/firejail/lodraw.profile firejail-$VERSION/etc/firejail/.
115install -m 644 /etc/firejail/loffice.profile firejail-$VERSION/etc/firejail/.
116install -m 644 /etc/firejail/lofromtemplate.profile firejail-$VERSION/etc/firejail/.
117install -m 644 /etc/firejail/login.users firejail-$VERSION/etc/firejail/.
118install -m 644 /etc/firejail/loimpress.profile firejail-$VERSION/etc/firejail/.
119install -m 644 /etc/firejail/lomath.profile firejail-$VERSION/etc/firejail/.
120install -m 644 /etc/firejail/loweb.profile firejail-$VERSION/etc/firejail/.
121install -m 644 /etc/firejail/lowriter.profile firejail-$VERSION/etc/firejail/.
122install -m 644 /etc/firejail/lxterminal.profile firejail-$VERSION/etc/firejail/.
123install -m 644 /etc/firejail/mathematica.profile firejail-$VERSION/etc/firejail/.
124install -m 644 /etc/firejail/Mathematica.profile firejail-$VERSION/etc/firejail/.
125install -m 644 /etc/firejail/mcabber.profile firejail-$VERSION/etc/firejail/.
126install -m 644 /etc/firejail/midori.profile firejail-$VERSION/etc/firejail/.
127install -m 644 /etc/firejail/mpv.profile firejail-$VERSION/etc/firejail/.
128install -m 644 /etc/firejail/mupen64plus.profile firejail-$VERSION/etc/firejail/.
129install -m 644 /etc/firejail/netsurf.profile firejail-$VERSION/etc/firejail/.
130install -m 644 /etc/firejail/nolocal.net firejail-$VERSION/etc/firejail/.
131install -m 644 /etc/firejail/okular.profile firejail-$VERSION/etc/firejail/.
132install -m 644 /etc/firejail/openbox.profile firejail-$VERSION/etc/firejail/.
133install -m 644 /etc/firejail/opera-beta.profile firejail-$VERSION/etc/firejail/.
134install -m 644 /etc/firejail/opera.profile firejail-$VERSION/etc/firejail/.
135install -m 644 /etc/firejail/palemoon.profile firejail-$VERSION/etc/firejail/.
136install -m 644 /etc/firejail/parole.profile firejail-$VERSION/etc/firejail/.
137install -m 644 /etc/firejail/pidgin.profile firejail-$VERSION/etc/firejail/.
138install -m 644 /etc/firejail/pix.profile firejail-$VERSION/etc/firejail/.
139install -m 644 /etc/firejail/polari.profile firejail-$VERSION/etc/firejail/.
140install -m 644 /etc/firejail/psi-plus.profile firejail-$VERSION/etc/firejail/.
141install -m 644 /etc/firejail/qbittorrent.profile firejail-$VERSION/etc/firejail/.
142install -m 644 /etc/firejail/qtox.profile firejail-$VERSION/etc/firejail/.
143install -m 644 /etc/firejail/quassel.profile firejail-$VERSION/etc/firejail/.
144install -m 644 /etc/firejail/quiterss.profile firejail-$VERSION/etc/firejail/.
145install -m 644 /etc/firejail/qutebrowser.profile firejail-$VERSION/etc/firejail/.
146install -m 644 /etc/firejail/rhythmbox.profile firejail-$VERSION/etc/firejail/.
147install -m 644 /etc/firejail/rtorrent.profile firejail-$VERSION/etc/firejail/.
148install -m 644 /etc/firejail/seamonkey-bin.profile firejail-$VERSION/etc/firejail/.
149install -m 644 /etc/firejail/seamonkey.profile firejail-$VERSION/etc/firejail/.
150install -m 644 /etc/firejail/server.profile firejail-$VERSION/etc/firejail/.
151install -m 644 /etc/firejail/skypeforlinux.profile firejail-$VERSION/etc/firejail/.
152install -m 644 /etc/firejail/skype.profile firejail-$VERSION/etc/firejail/.
153install -m 644 /etc/firejail/slack.profile firejail-$VERSION/etc/firejail/.
154install -m 644 /etc/firejail/snap.profile firejail-$VERSION/etc/firejail/.
155install -m 644 /etc/firejail/soffice.profile firejail-$VERSION/etc/firejail/.
156install -m 644 /etc/firejail/spotify.profile firejail-$VERSION/etc/firejail/.
157install -m 644 /etc/firejail/ssh.profile firejail-$VERSION/etc/firejail/.
158install -m 644 /etc/firejail/steam.profile firejail-$VERSION/etc/firejail/.
159install -m 644 /etc/firejail/stellarium.profile firejail-$VERSION/etc/firejail/.
160install -m 644 /etc/firejail/strings.profile firejail-$VERSION/etc/firejail/.
161install -m 644 /etc/firejail/tar.profile firejail-$VERSION/etc/firejail/.
162install -m 644 /etc/firejail/telegram.profile firejail-$VERSION/etc/firejail/.
163install -m 644 /etc/firejail/Telegram.profile firejail-$VERSION/etc/firejail/.
164install -m 644 /etc/firejail/thunderbird.profile firejail-$VERSION/etc/firejail/.
165install -m 644 /etc/firejail/totem.profile firejail-$VERSION/etc/firejail/.
166install -m 644 /etc/firejail/transmission-gtk.profile firejail-$VERSION/etc/firejail/.
167install -m 644 /etc/firejail/transmission-qt.profile firejail-$VERSION/etc/firejail/.
168install -m 644 /etc/firejail/uget-gtk.profile firejail-$VERSION/etc/firejail/.
169install -m 644 /etc/firejail/unbound.profile firejail-$VERSION/etc/firejail/.
170install -m 644 /etc/firejail/unrar.profile firejail-$VERSION/etc/firejail/.
171install -m 644 /etc/firejail/unzip.profile firejail-$VERSION/etc/firejail/.
172install -m 644 /etc/firejail/uudeview.profile firejail-$VERSION/etc/firejail/.
173install -m 644 /etc/firejail/vivaldi-beta.profile firejail-$VERSION/etc/firejail/.
174install -m 644 /etc/firejail/vivaldi.profile firejail-$VERSION/etc/firejail/.
175install -m 644 /etc/firejail/vlc.profile firejail-$VERSION/etc/firejail/.
176install -m 644 /etc/firejail/warzone2100.profile firejail-$VERSION/etc/firejail/.
177install -m 644 /etc/firejail/webserver.net firejail-$VERSION/etc/firejail/.
178install -m 644 /etc/firejail/weechat-curses.profile firejail-$VERSION/etc/firejail/.
179install -m 644 /etc/firejail/weechat.profile firejail-$VERSION/etc/firejail/.
180install -m 644 /etc/firejail/wesnoth.profile firejail-$VERSION/etc/firejail/.
181install -m 644 /etc/firejail/whitelist-common.inc firejail-$VERSION/etc/firejail/.
182install -m 644 /etc/firejail/wine.profile firejail-$VERSION/etc/firejail/.
183install -m 644 /etc/firejail/xchat.profile firejail-$VERSION/etc/firejail/.
184install -m 644 /etc/firejail/xplayer.profile firejail-$VERSION/etc/firejail/.
185install -m 644 /etc/firejail/xreader.profile firejail-$VERSION/etc/firejail/.
186install -m 644 /etc/firejail/xviewer.profile firejail-$VERSION/etc/firejail/.
187install -m 644 /etc/firejail/xzdec.profile firejail-$VERSION/etc/firejail/.
188install -m 644 /etc/firejail/xz.profile firejail-$VERSION/etc/firejail/.
189install -m 644 /etc/firejail/zathura.profile firejail-$VERSION/etc/firejail/.
190install -m 644 /etc/firejail/7z.profile firejail-$VERSION/etc/firejail/.
191install -m 644 /etc/firejail/keepass.profile firejail-$VERSION/etc/firejail/.
192install -m 644 /etc/firejail/keepassx.profile firejail-$VERSION/etc/firejail/.
193install -m 644 /etc/firejail/claws-mail.profile firejail-$VERSION/etc/firejail/.
194install -m 644 /etc/firejail/mutt.profile firejail-$VERSION/etc/firejail/.
195install -m 644 /etc/firejail/git.profile firejail-$VERSION/etc/firejail/.
196install -m 644 /etc/firejail/emacs.profile firejail-$VERSION/etc/firejail/.
197install -m 644 /etc/firejail/vim.profile firejail-$VERSION/etc/firejail/.
198install -m 644 /etc/firejail/xpdf.profile firejail-$VERSION/etc/firejail/.
199install -m 644 /etc/firejail/virtualbox.profile firejail-$VERSION/etc/firejail/.
200install -m 644 /etc/firejail/openshot.profile firejail-$VERSION/etc/firejail/.
201install -m 644 /etc/firejail/flowblade.profile firejail-$VERSION/etc/firejail/.
202install -m 644 /etc/firejail/eog.profile firejail-$VERSION/etc/firejail/.
203install -m 644 /etc/firejail/evolution.profile firejail-$VERSION/etc/firejail/.
204install -m 644 /etc/firejail/feh.profile firejail-$VERSION/etc/firejail/.
205install -m 644 /etc/firejail/gimp.profile firejail-$VERSION/etc/firejail/.
206install -m 644 /etc/firejail/inkscape.profile firejail-$VERSION/etc/firejail/.
207install -m 644 /etc/firejail/luminance-hdr.profile firejail-$VERSION/etc/firejail/.
208install -m 644 /etc/firejail/mupdf.profile firejail-$VERSION/etc/firejail/.
209install -m 644 /etc/firejail/qpdfview.profile firejail-$VERSION/etc/firejail/.
210install -m 644 /etc/firejail/ranger.profile firejail-$VERSION/etc/firejail/.
211install -m 644 /etc/firejail/synfigstudio.profile firejail-$VERSION/etc/firejail/.
212
213
214mkdir -p firejail-$VERSION/usr/share/bash-completion/completions
215install -m 644 /usr/share/bash-completion/completions/firejail firejail-$VERSION/usr/share/bash-completion/completions/.
216install -m 644 /usr/share/bash-completion/completions/firemon firejail-$VERSION/usr/share/bash-completion/completions/.
217install -m 644 /usr/share/bash-completion/completions/firecfg firejail-$VERSION/usr/share/bash-completion/completions/.
218
219echo "building tar.gz archive"
220tar -czvf firejail-$VERSION.tar.gz firejail-$VERSION
221
222cp firejail-$VERSION.tar.gz SOURCES/.
223
224echo "building config spec"
225cat <<EOF > SPECS/firejail.spec
226%define __spec_install_post %{nil}
227%define debug_package %{nil}
228%define __os_install_post %{_dbpath}/brp-compress
229
230Summary: Linux namepaces sandbox program
231Name: firejail
232Version: $VERSION
233Release: 1
234License: GPL+
235Group: Development/Tools
236SOURCE0 : %{name}-%{version}.tar.gz
237URL: http://firejail.wordpress.com
238
239BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
240
241%description
242Firejail is a SUID sandbox program that reduces the risk of security
243breaches by restricting the running environment of untrusted applications
244using Linux namespaces. It includes a sandbox profile for Mozilla Firefox.
245
246%prep
247%setup -q
248
249%build
250
251%install
252rm -rf %{buildroot}
253mkdir -p %{buildroot}
254
255cp -a * %{buildroot}
256
257
258%clean
259rm -rf %{buildroot}
260
261
262%files
263%defattr(-,root,root,-)
264%config(noreplace) %{_sysconfdir}/%{name}/0ad.profile
265%config(noreplace) %{_sysconfdir}/%{name}/abrowser.profile
266%config(noreplace) %{_sysconfdir}/%{name}/atom-beta.profile
267%config(noreplace) %{_sysconfdir}/%{name}/atom.profile
268%config(noreplace) %{_sysconfdir}/%{name}/atril.profile
269%config(noreplace) %{_sysconfdir}/%{name}/audacious.profile
270%config(noreplace) %{_sysconfdir}/%{name}/audacity.profile
271%config(noreplace) %{_sysconfdir}/%{name}/aweather.profile
272%config(noreplace) %{_sysconfdir}/%{name}/bitlbee.profile
273%config(noreplace) %{_sysconfdir}/%{name}/brave.profile
274%config(noreplace) %{_sysconfdir}/%{name}/cherrytree.profile
275%config(noreplace) %{_sysconfdir}/%{name}/chromium-browser.profile
276%config(noreplace) %{_sysconfdir}/%{name}/chromium.profile
277%config(noreplace) %{_sysconfdir}/%{name}/clementine.profile
278%config(noreplace) %{_sysconfdir}/%{name}/cmus.profile
279%config(noreplace) %{_sysconfdir}/%{name}/conkeror.profile
280%config(noreplace) %{_sysconfdir}/%{name}/corebird.profile
281%config(noreplace) %{_sysconfdir}/%{name}/cpio.profile
282%config(noreplace) %{_sysconfdir}/%{name}/cyberfox.profile
283%config(noreplace) %{_sysconfdir}/%{name}/Cyberfox.profile
284%config(noreplace) %{_sysconfdir}/%{name}/deadbeef.profile
285%config(noreplace) %{_sysconfdir}/%{name}/default.profile
286%config(noreplace) %{_sysconfdir}/%{name}/deluge.profile
287%config(noreplace) %{_sysconfdir}/%{name}/dillo.profile
288%config(noreplace) %{_sysconfdir}/%{name}/disable-common.inc
289%config(noreplace) %{_sysconfdir}/%{name}/disable-devel.inc
290%config(noreplace) %{_sysconfdir}/%{name}/disable-passwdmgr.inc
291%config(noreplace) %{_sysconfdir}/%{name}/disable-programs.inc
292%config(noreplace) %{_sysconfdir}/%{name}/dnscrypt-proxy.profile
293%config(noreplace) %{_sysconfdir}/%{name}/dnsmasq.profile
294%config(noreplace) %{_sysconfdir}/%{name}/dosbox.profile
295%config(noreplace) %{_sysconfdir}/%{name}/dropbox.profile
296%config(noreplace) %{_sysconfdir}/%{name}/empathy.profile
297%config(noreplace) %{_sysconfdir}/%{name}/eom.profile
298%config(noreplace) %{_sysconfdir}/%{name}/epiphany.profile
299%config(noreplace) %{_sysconfdir}/%{name}/evince.profile
300%config(noreplace) %{_sysconfdir}/%{name}/fbreader.profile
301%config(noreplace) %{_sysconfdir}/%{name}/file.profile
302%config(noreplace) %{_sysconfdir}/%{name}/filezilla.profile
303%config(noreplace) %{_sysconfdir}/%{name}/firefox-esr.profile
304%config(noreplace) %{_sysconfdir}/%{name}/firefox.profile
305%config(noreplace) %{_sysconfdir}/%{name}/firejail.config
306%config(noreplace) %{_sysconfdir}/%{name}/flashpeak-slimjet.profile
307%config(noreplace) %{_sysconfdir}/%{name}/franz.profile
308%config(noreplace) %{_sysconfdir}/%{name}/gajim.profile
309%config(noreplace) %{_sysconfdir}/%{name}/gitter.profile
310%config(noreplace) %{_sysconfdir}/%{name}/gnome-chess.profile
311%config(noreplace) %{_sysconfdir}/%{name}/gnome-mplayer.profile
312%config(noreplace) %{_sysconfdir}/%{name}/google-chrome-beta.profile
313%config(noreplace) %{_sysconfdir}/%{name}/google-chrome.profile
314%config(noreplace) %{_sysconfdir}/%{name}/google-chrome-stable.profile
315%config(noreplace) %{_sysconfdir}/%{name}/google-chrome-unstable.profile
316%config(noreplace) %{_sysconfdir}/%{name}/google-play-music-desktop-player.profile
317%config(noreplace) %{_sysconfdir}/%{name}/gpredict.profile
318%config(noreplace) %{_sysconfdir}/%{name}/gtar.profile
319%config(noreplace) %{_sysconfdir}/%{name}/gthumb.profile
320%config(noreplace) %{_sysconfdir}/%{name}/gwenview.profile
321%config(noreplace) %{_sysconfdir}/%{name}/gzip.profile
322%config(noreplace) %{_sysconfdir}/%{name}/hedgewars.profile
323%config(noreplace) %{_sysconfdir}/%{name}/hexchat.profile
324%config(noreplace) %{_sysconfdir}/%{name}/icecat.profile
325%config(noreplace) %{_sysconfdir}/%{name}/icedove.profile
326%config(noreplace) %{_sysconfdir}/%{name}/iceweasel.profile
327%config(noreplace) %{_sysconfdir}/%{name}/inox.profile
328%config(noreplace) %{_sysconfdir}/%{name}/jitsi.profile
329%config(noreplace) %{_sysconfdir}/%{name}/kmail.profile
330%config(noreplace) %{_sysconfdir}/%{name}/konversation.profile
331%config(noreplace) %{_sysconfdir}/%{name}/less.profile
332%config(noreplace) %{_sysconfdir}/%{name}/libreoffice.profile
333%config(noreplace) %{_sysconfdir}/%{name}/localc.profile
334%config(noreplace) %{_sysconfdir}/%{name}/lodraw.profile
335%config(noreplace) %{_sysconfdir}/%{name}/loffice.profile
336%config(noreplace) %{_sysconfdir}/%{name}/lofromtemplate.profile
337%config(noreplace) %{_sysconfdir}/%{name}/login.users
338%config(noreplace) %{_sysconfdir}/%{name}/loimpress.profile
339%config(noreplace) %{_sysconfdir}/%{name}/lomath.profile
340%config(noreplace) %{_sysconfdir}/%{name}/loweb.profile
341%config(noreplace) %{_sysconfdir}/%{name}/lowriter.profile
342%config(noreplace) %{_sysconfdir}/%{name}/lxterminal.profile
343%config(noreplace) %{_sysconfdir}/%{name}/mathematica.profile
344%config(noreplace) %{_sysconfdir}/%{name}/Mathematica.profile
345%config(noreplace) %{_sysconfdir}/%{name}/mcabber.profile
346%config(noreplace) %{_sysconfdir}/%{name}/midori.profile
347%config(noreplace) %{_sysconfdir}/%{name}/mpv.profile
348%config(noreplace) %{_sysconfdir}/%{name}/mupen64plus.profile
349%config(noreplace) %{_sysconfdir}/%{name}/netsurf.profile
350%config(noreplace) %{_sysconfdir}/%{name}/nolocal.net
351%config(noreplace) %{_sysconfdir}/%{name}/okular.profile
352%config(noreplace) %{_sysconfdir}/%{name}/openbox.profile
353%config(noreplace) %{_sysconfdir}/%{name}/opera-beta.profile
354%config(noreplace) %{_sysconfdir}/%{name}/opera.profile
355%config(noreplace) %{_sysconfdir}/%{name}/palemoon.profile
356%config(noreplace) %{_sysconfdir}/%{name}/parole.profile
357%config(noreplace) %{_sysconfdir}/%{name}/pidgin.profile
358%config(noreplace) %{_sysconfdir}/%{name}/pix.profile
359%config(noreplace) %{_sysconfdir}/%{name}/polari.profile
360%config(noreplace) %{_sysconfdir}/%{name}/psi-plus.profile
361%config(noreplace) %{_sysconfdir}/%{name}/qbittorrent.profile
362%config(noreplace) %{_sysconfdir}/%{name}/qtox.profile
363%config(noreplace) %{_sysconfdir}/%{name}/quassel.profile
364%config(noreplace) %{_sysconfdir}/%{name}/quiterss.profile
365%config(noreplace) %{_sysconfdir}/%{name}/qutebrowser.profile
366%config(noreplace) %{_sysconfdir}/%{name}/rhythmbox.profile
367%config(noreplace) %{_sysconfdir}/%{name}/rtorrent.profile
368%config(noreplace) %{_sysconfdir}/%{name}/seamonkey-bin.profile
369%config(noreplace) %{_sysconfdir}/%{name}/seamonkey.profile
370%config(noreplace) %{_sysconfdir}/%{name}/server.profile
371%config(noreplace) %{_sysconfdir}/%{name}/skypeforlinux.profile
372%config(noreplace) %{_sysconfdir}/%{name}/skype.profile
373%config(noreplace) %{_sysconfdir}/%{name}/slack.profile
374%config(noreplace) %{_sysconfdir}/%{name}/snap.profile
375%config(noreplace) %{_sysconfdir}/%{name}/soffice.profile
376%config(noreplace) %{_sysconfdir}/%{name}/spotify.profile
377%config(noreplace) %{_sysconfdir}/%{name}/ssh.profile
378%config(noreplace) %{_sysconfdir}/%{name}/steam.profile
379%config(noreplace) %{_sysconfdir}/%{name}/stellarium.profile
380%config(noreplace) %{_sysconfdir}/%{name}/strings.profile
381%config(noreplace) %{_sysconfdir}/%{name}/tar.profile
382%config(noreplace) %{_sysconfdir}/%{name}/telegram.profile
383%config(noreplace) %{_sysconfdir}/%{name}/Telegram.profile
384%config(noreplace) %{_sysconfdir}/%{name}/thunderbird.profile
385%config(noreplace) %{_sysconfdir}/%{name}/totem.profile
386%config(noreplace) %{_sysconfdir}/%{name}/transmission-gtk.profile
387%config(noreplace) %{_sysconfdir}/%{name}/transmission-qt.profile
388%config(noreplace) %{_sysconfdir}/%{name}/uget-gtk.profile
389%config(noreplace) %{_sysconfdir}/%{name}/unbound.profile
390%config(noreplace) %{_sysconfdir}/%{name}/unrar.profile
391%config(noreplace) %{_sysconfdir}/%{name}/unzip.profile
392%config(noreplace) %{_sysconfdir}/%{name}/uudeview.profile
393%config(noreplace) %{_sysconfdir}/%{name}/vivaldi-beta.profile
394%config(noreplace) %{_sysconfdir}/%{name}/vivaldi.profile
395%config(noreplace) %{_sysconfdir}/%{name}/vlc.profile
396%config(noreplace) %{_sysconfdir}/%{name}/warzone2100.profile
397%config(noreplace) %{_sysconfdir}/%{name}/webserver.net
398%config(noreplace) %{_sysconfdir}/%{name}/weechat-curses.profile
399%config(noreplace) %{_sysconfdir}/%{name}/weechat.profile
400%config(noreplace) %{_sysconfdir}/%{name}/wesnoth.profile
401%config(noreplace) %{_sysconfdir}/%{name}/whitelist-common.inc
402%config(noreplace) %{_sysconfdir}/%{name}/wine.profile
403%config(noreplace) %{_sysconfdir}/%{name}/xchat.profile
404%config(noreplace) %{_sysconfdir}/%{name}/xplayer.profile
405%config(noreplace) %{_sysconfdir}/%{name}/xreader.profile
406%config(noreplace) %{_sysconfdir}/%{name}/xviewer.profile
407%config(noreplace) %{_sysconfdir}/%{name}/xzdec.profile
408%config(noreplace) %{_sysconfdir}/%{name}/xz.profile
409%config(noreplace) %{_sysconfdir}/%{name}/zathura.profile
410%config(noreplace) %{_sysconfdir}/%{name}/7z.profile
411%config(noreplace) %{_sysconfdir}/%{name}/keepass.profile
412%config(noreplace) %{_sysconfdir}/%{name}/keepassx.profile
413%config(noreplace) %{_sysconfdir}/%{name}/claws-mail.profile
414%config(noreplace) %{_sysconfdir}/%{name}/mutt.profile
415%config(noreplace) %{_sysconfdir}/%{name}/git.profile
416%config(noreplace) %{_sysconfdir}/%{name}/emacs.profile
417%config(noreplace) %{_sysconfdir}/%{name}/vim.profile
418%config(noreplace) %{_sysconfdir}/%{name}/xpdf.profile
419%config(noreplace) %{_sysconfdir}/%{name}/virtualbox.profile
420%config(noreplace) %{_sysconfdir}/%{name}/openshot.profile
421%config(noreplace) %{_sysconfdir}/%{name}/flowblade.profile
422%config(noreplace) %{_sysconfdir}/%{name}/eog.profile
423%config(noreplace) %{_sysconfdir}/%{name}/evolution.profile
424%config(noreplace) %{_sysconfdir}/%{name}/feh.profile
425%config(noreplace) %{_sysconfdir}/%{name}/inkscape.profile
426%config(noreplace) %{_sysconfdir}/%{name}/gimp.profile
427%config(noreplace) %{_sysconfdir}/%{name}/luminance-hdr.profile
428%config(noreplace) %{_sysconfdir}/%{name}/mupdf.profile
429%config(noreplace) %{_sysconfdir}/%{name}/qpdfview.profile
430%config(noreplace) %{_sysconfdir}/%{name}/ranger.profile
431%config(noreplace) %{_sysconfdir}/%{name}/synfigstudio.profile
432
433/usr/bin/firejail
434/usr/bin/firemon
435/usr/bin/firecfg
436
437/usr/lib/firejail/libtrace.so
438/usr/lib/firejail/libtracelog.so
439/usr/lib/firejail/libconnect.so
440/usr/lib/firejail/faudit
441/usr/lib/firejail/ftee
442/usr/lib/firejail/firecfg.config
443/usr/lib/firejail/fshaper.sh
444
445/usr/share/doc/packages/firejail/COPYING
446/usr/share/doc/packages/firejail/README
447/usr/share/doc/packages/firejail/RELNOTES
448/usr/share/man/man1/firejail.1.gz
449/usr/share/man/man1/firemon.1.gz
450/usr/share/man/man1/firecfg.1.gz
451/usr/share/man/man5/firejail-profile.5.gz
452/usr/share/man/man5/firejail-login.5.gz
453/usr/share/bash-completion/completions/firejail
454/usr/share/bash-completion/completions/firemon
455/usr/share/bash-completion/completions/firecfg
456
457%post
458chmod u+s /usr/bin/firejail
459
460%changelog
461* Fri Oct 21 2016 netblue30 <netblue30@yahoo.com> 0.9.44-1
462 - CVE-2016-7545 submitted by Aleksey Manevich
463 - modifs: removed man firejail-config
464 - modifs: --private-tmp whitelists /tmp/.X11-unix directory
465 - modifs: Nvidia drivers added to --private-dev
466 - modifs: /srv supported by --whitelist
467 - feature: allow user access to /sys/fs (--noblacklist=/sys/fs)
468 - feature: support starting/joining sandbox is a single command
469 (--join-or-start)
470 - feature: X11 detection support for --audit
471 - feature: assign a name to the interface connected to the bridge
472 (--veth-name)
473 - feature: all user home directories are visible (--allusers)
474 - feature: add files to sandbox container (--put)
475 - feature: blocking x11 (--x11=block)
476 - feature: X11 security extension (--x11=xorg)
477 - feature: disable 3D hardware acceleration (--no3d)
478 - feature: x11 xpra, x11 xephyr, x11 block, allusers, no3d profile commands
479 - feature: move files in sandbox (--put)
480 - feature: accept wildcard patterns in user name field of restricted
481 shell login feature
482 - new profiles: qpdfview, mupdf, Luminance HDR, Synfig Studio, Gimp, Inkscape
483 - new profiles: feh, ranger, zathura, 7z, keepass, keepassx,
484 - new profiles: claws-mail, mutt, git, emacs, vim, xpdf, VirtualBox, OpenShot
485 - new profiles: Flowblade, Eye of GNOME (eog), Evolution
486 - bugfixes
487
488* Thu Sep 8 2016 netblue30 <netblue30@yahoo.com> 0.9.42-1
489 - security: --whitelist deleted files, submitted by Vasya Novikov
490 - security: disable x32 ABI in seccomp, submitted by Jann Horn
491 - security: tighten --chroot, submitted by Jann Horn
492 - security: terminal sandbox escape, submitted by Stephan Sokolow
493 - security: several TOCTOU fixes submitted by Aleksey Manevich
494 - modifs: bringing back --private-home option
495 - modifs: deprecated --user option, please use "sudo -u username firejail"
496 - modifs: allow symlinks in home directory for --whitelist option
497 - modifs: Firejail prompt is enabled by env variable FIREJAIL_PROMPT="yes"
498 - modifs: recursive mkdir
499 - modifs: include /dev/snd in --private-dev
500 - modifs: seccomp filter update
501 - modifs: release archives moved to .xz format
502 - feature: AppImage support (--appimage)
503 - feature: AppArmor support (--apparmor)
504 - feature: Ubuntu snap support (/etc/firejail/snap.profile)
505 - feature: Sandbox auditing support (--audit)
506 - feature: remove environment variable (--rmenv)
507 - feature: noexec support (--noexec)
508 - feature: clean local overlay storage directory (--overlay-clean)
509 - feature: store and reuse overlay (--overlay-named)
510 - feature: allow debugging inside the sandbox with gdb and strace
511 (--allow-debuggers)
512 - feature: mkfile profile command
513 - feature: quiet profile command
514 - feature: x11 profile command
515 - feature: option to fix desktop files (firecfg --fix)
516 - compile time: Busybox support (--enable-busybox-workaround)
517 - compile time: disable overlayfs (--disable-overlayfs)
518 - compile time: disable whitlisting (--disable-whitelist)
519 - compile time: disable global config (--disable-globalcfg)
520 - run time: enable/disable overlayfs (overlayfs yes/no)
521 - run time: enable/disable quiet as default (quiet-by-default yes/no)
522 - run time: user-defined network filter (netfilter-default)
523 - run time: enable/disable whitelisting (whitelist yes/no)
524 - run time: enable/disable remounting of /proc and /sys
525 (remount-proc-sys yes/no)
526 - run time: enable/disable chroot desktop features (chroot-desktop yes/no)
527 - profiles: Gitter, gThumb, mpv, Franz messenger, LibreOffice
528 - profiles: pix, audacity, xz, xzdec, gzip, cpio, less
529 - profiles: Atom Beta, Atom, jitsi, eom, uudeview
530 - profiles: tar (gtar), unzip, unrar, file, skypeforlinux,
531 - profiles: inox, Slack, gnome-chess. Gajim IM client, DOSBox
532 - bugfixes
533
534EOF
535
536echo "building rpm"
537rpmbuild -ba SPECS/firejail.spec
538rpm -qpl RPMS/x86_64/firejail-$VERSION-1.x86_64.rpm
539cd ..
540rm -f firejail-$VERSION-1.x86_64.rpm
541cp rpmbuild/RPMS/x86_64/firejail-$VERSION-1.x86_64.rpm .
542
diff --git a/src/faudit/syscall.c b/src/faudit/syscall.c
index 9924be00f..3c87305df 100644
--- a/src/faudit/syscall.c
+++ b/src/faudit/syscall.c
@@ -92,7 +92,8 @@ void syscall_run(const char *name) {
92 errExit("fork"); 92 errExit("fork");
93 if (child == 0) { 93 if (child == 0) {
94 execl(prog, prog, "syscall", name, NULL); 94 execl(prog, prog, "syscall", name, NULL);
95 exit(1); 95 perror("execl");
96 _exit(1);
96 } 97 }
97 98
98 // wait for the child to finish 99 // wait for the child to finish
diff --git a/src/firecfg/firecfg.config b/src/firecfg/firecfg.config
index 31f6b2fd5..e3e333497 100644
--- a/src/firecfg/firecfg.config
+++ b/src/firecfg/firecfg.config
@@ -42,11 +42,13 @@ opera-beta
42opera 42opera
43palemoon 43palemoon
44qutebrowser 44qutebrowser
45start-tor-browser
45seamonkey 46seamonkey
46seamonkey-bin 47seamonkey-bin
47thunderbird 48thunderbird
48vivaldi-beta 49vivaldi-beta
49vivaldi 50vivaldi
51evolution
50 52
51# chat/messaging 53# chat/messaging
52bitlbee 54bitlbee
@@ -76,6 +78,7 @@ unbound
76mupen64plus 78mupen64plus
77wine 79wine
78dosbox 80dosbox
81virtualbox
79 82
80# games 83# games
810ad 840ad
@@ -137,6 +140,9 @@ pix
137xpdf 140xpdf
138xreader 141xreader
139zathura 142zathura
143openshot
144flowblade
145eog
140 146
141# other 147# other
142ssh 148ssh
@@ -145,6 +151,7 @@ atom
145ranger 151ranger
146keepass 152keepass
147keepassx 153keepassx
154xiphos
148 155
149# weather/climate 156# weather/climate
150aweather 157aweather
diff --git a/src/firejail/appimage.c b/src/firejail/appimage.c
index 375d6be24..09b242964 100644
--- a/src/firejail/appimage.c
+++ b/src/firejail/appimage.c
@@ -39,7 +39,7 @@ void appimage_set(const char *appimage_path) {
39 assert(appimage_path); 39 assert(appimage_path);
40 assert(devloop == NULL); // don't call this twice! 40 assert(devloop == NULL); // don't call this twice!
41 EUID_ASSERT(); 41 EUID_ASSERT();
42 42
43#ifdef LOOP_CTL_GET_FREE // test for older kernels; this definition is found in /usr/include/linux/loop.h 43#ifdef LOOP_CTL_GET_FREE // test for older kernels; this definition is found in /usr/include/linux/loop.h
44 // check appimage_path 44 // check appimage_path
45 if (access(appimage_path, R_OK) == -1) { 45 if (access(appimage_path, R_OK) == -1) {
@@ -47,6 +47,12 @@ void appimage_set(const char *appimage_path) {
47 exit(1); 47 exit(1);
48 } 48 }
49 49
50 // get appimage type and ELF size
51 // a value of 0 means we are dealing with a type1 appimage
52 long unsigned int size = appimage2_size(appimage_path);
53 if (arg_debug)
54 printf("AppImage ELF size %lu\n", size);
55
50 // open as user to prevent race condition 56 // open as user to prevent race condition
51 int ffd = open(appimage_path, O_RDONLY|O_CLOEXEC); 57 int ffd = open(appimage_path, O_RDONLY|O_CLOEXEC);
52 if (ffd == -1) { 58 if (ffd == -1) {
@@ -76,12 +82,21 @@ void appimage_set(const char *appimage_path) {
76 fprintf(stderr, "Error: cannot configure the loopback device\n"); 82 fprintf(stderr, "Error: cannot configure the loopback device\n");
77 exit(1); 83 exit(1);
78 } 84 }
85
86 if (size) {
87 struct loop_info64 info;
88 memset(&info, 0, sizeof(struct loop_info64));
89 info.lo_offset = size;
90 if (ioctl(lfd, LOOP_SET_STATUS64, &info) == -1)
91 errExit("configure appimage offset");
92 }
93
79 close(lfd); 94 close(lfd);
80 close(ffd); 95 close(ffd);
81 EUID_USER(); 96 EUID_USER();
82 97
83 // creates appimage mount point perms 0700 98 // creates appimage mount point perms 0700
84 if (asprintf(&mntdir, "%s/appimage-%u", RUN_FIREJAIL_APPIMAGE_DIR, getpid()) == -1) 99 if (asprintf(&mntdir, "%s/.appimage-%u", RUN_FIREJAIL_APPIMAGE_DIR, getpid()) == -1)
85 errExit("asprintf"); 100 errExit("asprintf");
86 EUID_ROOT(); 101 EUID_ROOT();
87 if (mkdir(mntdir, 0700) == -1) { 102 if (mkdir(mntdir, 0700) == -1) {
@@ -100,8 +115,16 @@ void appimage_set(const char *appimage_path) {
100 if (asprintf(&mode, "mode=700,uid=%d,gid=%d", getuid(), getgid()) == -1) 115 if (asprintf(&mode, "mode=700,uid=%d,gid=%d", getuid(), getgid()) == -1)
101 errExit("asprintf"); 116 errExit("asprintf");
102 EUID_ROOT(); 117 EUID_ROOT();
103 if (mount(devloop, mntdir, "iso9660",MS_MGC_VAL|MS_RDONLY, mode) < 0) 118
104 errExit("mounting appimage"); 119 if (size == 0) {
120 if (mount(devloop, mntdir, "iso9660",MS_MGC_VAL|MS_RDONLY, mode) < 0)
121 errExit("mounting appimage");
122 }
123 else {
124 if (mount(devloop, mntdir, "squashfs",MS_MGC_VAL|MS_RDONLY, mode) < 0)
125 errExit("mounting appimage");
126 }
127
105 if (arg_debug) 128 if (arg_debug)
106 printf("appimage mounted on %s\n", mntdir); 129 printf("appimage mounted on %s\n", mntdir);
107 EUID_USER(); 130 EUID_USER();
diff --git a/src/firejail/appimage_size.c b/src/firejail/appimage_size.c
new file mode 100644
index 000000000..c8b3d28c5
--- /dev/null
+++ b/src/firejail/appimage_size.c
@@ -0,0 +1,143 @@
1/*
2Compile with:
3gcc elfsize.c -o elfsize
4Example:
5ls -l 126584
6Calculation using the values also reported by readelf -h:
7Start of section headers e_shoff 124728
8Size of section headers e_shentsize 64
9Number of section headers e_shnum 29
10e_shoff + ( e_shentsize * e_shnum ) = 126584
11*/
12
13#include <elf.h>
14#include <byteswap.h>
15#include <stdio.h>
16#include <stdint.h>
17#include <errno.h>
18#include <stdlib.h>
19#include <unistd.h>
20#include <string.h>
21#include <fcntl.h>
22
23typedef Elf32_Nhdr Elf_Nhdr;
24
25static Elf64_Ehdr ehdr;
26static Elf64_Phdr *phdr;
27
28#if __BYTE_ORDER == __LITTLE_ENDIAN
29#define ELFDATANATIVE ELFDATA2LSB
30#elif __BYTE_ORDER == __BIG_ENDIAN
31#define ELFDATANATIVE ELFDATA2MSB
32#else
33#error "Unknown machine endian"
34#endif
35
36static uint16_t file16_to_cpu(uint16_t val) {
37 if (ehdr.e_ident[EI_DATA] != ELFDATANATIVE)
38 val = bswap_16(val);
39 return val;
40}
41
42
43static uint32_t file32_to_cpu(uint32_t val) {
44 if (ehdr.e_ident[EI_DATA] != ELFDATANATIVE)
45 val = bswap_32(val);
46 return val;
47}
48
49
50static uint64_t file64_to_cpu(uint64_t val) {
51 if (ehdr.e_ident[EI_DATA] != ELFDATANATIVE)
52 val = bswap_64(val);
53 return val;
54}
55
56
57// return 0 if error
58static long unsigned int read_elf32(int fd) {
59 Elf32_Ehdr ehdr32;
60 ssize_t ret, i;
61
62 ret = pread(fd, &ehdr32, sizeof(ehdr32), 0);
63 if (ret < 0 || (size_t)ret != sizeof(ehdr))
64 return 0;
65
66 ehdr.e_shoff = file32_to_cpu(ehdr32.e_shoff);
67 ehdr.e_shentsize = file16_to_cpu(ehdr32.e_shentsize);
68 ehdr.e_shnum = file16_to_cpu(ehdr32.e_shnum);
69
70 return(ehdr.e_shoff + (ehdr.e_shentsize * ehdr.e_shnum));
71}
72
73
74// return 0 if error
75static long unsigned int read_elf64(int fd) {
76 Elf64_Ehdr ehdr64;
77 ssize_t ret, i;
78
79 ret = pread(fd, &ehdr64, sizeof(ehdr64), 0);
80 if (ret < 0 || (size_t)ret != sizeof(ehdr))
81 return 0;
82
83 ehdr.e_shoff = file64_to_cpu(ehdr64.e_shoff);
84 ehdr.e_shentsize = file16_to_cpu(ehdr64.e_shentsize);
85 ehdr.e_shnum = file16_to_cpu(ehdr64.e_shnum);
86
87 return(ehdr.e_shoff + (ehdr.e_shentsize * ehdr.e_shnum));
88}
89
90
91// return 0 if error
92// return 0 if this is not an appimgage2 file
93long unsigned int appimage2_size(const char *fname) {
94/* TODO, FIXME: This assumes that the section header table (SHT) is
95the last part of the ELF. This is usually the case but
96it could also be that the last section is the last part
97of the ELF. This should be checked for.
98*/
99 ssize_t ret;
100 int fd;
101 long unsigned int size = 0;
102
103 fd = open(fname, O_RDONLY);
104 if (fd < 0)
105 return 0;
106
107 ret = pread(fd, ehdr.e_ident, EI_NIDENT, 0);
108 if (ret != EI_NIDENT)
109 goto getout;
110
111 if ((ehdr.e_ident[EI_DATA] != ELFDATA2LSB) &&
112 (ehdr.e_ident[EI_DATA] != ELFDATA2MSB))
113 goto getout;
114
115 if(ehdr.e_ident[EI_CLASS] == ELFCLASS32) {
116 size = read_elf32(fd);
117 }
118 else if(ehdr.e_ident[EI_CLASS] == ELFCLASS64) {
119 size = read_elf64(fd);
120 }
121 else {
122 goto getout;
123 }
124 if (size == 0)
125 goto getout;
126
127
128 // look for a LZMA header at this location
129 unsigned char buf[4];
130 ret = pread(fd, buf, 4, size);
131 if (ret != 4) {
132 size = 0;
133 goto getout;
134 }
135 if (memcmp(buf, "hsqs", 4) != 0)
136 size = 0;
137
138getout:
139 close(fd);
140 return size;
141}
142
143
diff --git a/src/firejail/firejail.h b/src/firejail/firejail.h
index dafa5919c..9a9bb1ae7 100644
--- a/src/firejail/firejail.h
+++ b/src/firejail/firejail.h
@@ -681,8 +681,12 @@ void appimage_set(const char *appimage_path);
681void appimage_clear(void); 681void appimage_clear(void);
682const char *appimage_getdir(void); 682const char *appimage_getdir(void);
683 683
684// appimage_size.c
685long unsigned int appimage2_size(const char *fname);
686
684// cmdline.c 687// cmdline.c
685void build_cmdline(char **command_line, char **window_title, int argc, char **argv, int index); 688void build_cmdline(char **command_line, char **window_title, int argc, char **argv, int index);
686 689
690
687#endif 691#endif
688 692
diff --git a/src/firejail/fs.c b/src/firejail/fs.c
index a5f12c7df..6c566bd90 100644
--- a/src/firejail/fs.c
+++ b/src/firejail/fs.c
@@ -649,7 +649,11 @@ void fs_proc_sys_dev_boot(void) {
649 649
650 disable_file(BLACKLIST_FILE, "/sys/firmware"); 650 disable_file(BLACKLIST_FILE, "/sys/firmware");
651 disable_file(BLACKLIST_FILE, "/sys/hypervisor"); 651 disable_file(BLACKLIST_FILE, "/sys/hypervisor");
652 disable_file(BLACKLIST_FILE, "/sys/fs"); 652 { // allow user access to /sys/fs if "--noblacklist=/sys/fs" is present on the command line
653 EUID_USER();
654 profile_add("blacklist /sys/fs");
655 EUID_ROOT();
656 }
653 disable_file(BLACKLIST_FILE, "/sys/module"); 657 disable_file(BLACKLIST_FILE, "/sys/module");
654 disable_file(BLACKLIST_FILE, "/sys/power"); 658 disable_file(BLACKLIST_FILE, "/sys/power");
655 disable_file(BLACKLIST_FILE, "/sys/kernel/debug"); 659 disable_file(BLACKLIST_FILE, "/sys/kernel/debug");
diff --git a/src/firejail/fs_bin.c b/src/firejail/fs_bin.c
index e65474f44..ba0633649 100644
--- a/src/firejail/fs_bin.c
+++ b/src/firejail/fs_bin.c
@@ -192,6 +192,8 @@ static void duplicate(char *fname) {
192 if (asprintf(&f, "%s/%s", RUN_BIN_DIR, fname) == -1) 192 if (asprintf(&f, "%s/%s", RUN_BIN_DIR, fname) == -1)
193 errExit("asprintf"); 193 errExit("asprintf");
194 execlp(RUN_CP_COMMAND, RUN_CP_COMMAND, "-a", actual_path, f, NULL); 194 execlp(RUN_CP_COMMAND, RUN_CP_COMMAND, "-a", actual_path, f, NULL);
195 perror("execlp");
196 _exit(1);
195 } 197 }
196 // wait for the child to finish 198 // wait for the child to finish
197 waitpid(child, NULL, 0); 199 waitpid(child, NULL, 0);
@@ -245,7 +247,7 @@ void fs_private_bin_list(void) {
245 duplicate(ptr); 247 duplicate(ptr);
246 free(dlist); 248 free(dlist);
247 fs_logger_print(); 249 fs_logger_print();
248 exit(0); 250 _exit(0);
249 } 251 }
250 // wait for the child to finish 252 // wait for the child to finish
251 waitpid(child, NULL, 0); 253 waitpid(child, NULL, 0);
diff --git a/src/firejail/fs_etc.c b/src/firejail/fs_etc.c
index fc9e40ca0..de29c312e 100644
--- a/src/firejail/fs_etc.c
+++ b/src/firejail/fs_etc.c
@@ -106,6 +106,8 @@ static void duplicate(char *fname) {
106 if (asprintf(&f, "/etc/%s", fname) == -1) 106 if (asprintf(&f, "/etc/%s", fname) == -1)
107 errExit("asprintf"); 107 errExit("asprintf");
108 execlp(RUN_CP_COMMAND, RUN_CP_COMMAND, "-a", "--parents", f, RUN_MNT_DIR, NULL); 108 execlp(RUN_CP_COMMAND, RUN_CP_COMMAND, "-a", "--parents", f, RUN_MNT_DIR, NULL);
109 perror("execlp");
110 _exit(1);
109 } 111 }
110 // wait for the child to finish 112 // wait for the child to finish
111 waitpid(child, NULL, 0); 113 waitpid(child, NULL, 0);
@@ -169,7 +171,7 @@ void fs_private_etc_list(void) {
169 duplicate(ptr); 171 duplicate(ptr);
170 free(dlist); 172 free(dlist);
171 fs_logger_print(); 173 fs_logger_print();
172 exit(0); 174 _exit(0);
173 } 175 }
174 // wait for the child to finish 176 // wait for the child to finish
175 waitpid(child, NULL, 0); 177 waitpid(child, NULL, 0);
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c
index bd3c404e9..75cc3e732 100644
--- a/src/firejail/fs_home.c
+++ b/src/firejail/fs_home.c
@@ -641,7 +641,7 @@ void fs_private_home_list(void) {
641 641
642 fs_logger_print(); // save the current log 642 fs_logger_print(); // save the current log
643 free(dlist); 643 free(dlist);
644 exit(0); 644 _exit(0);
645 } 645 }
646 // wait for the child to finish 646 // wait for the child to finish
647 waitpid(child, NULL, 0); 647 waitpid(child, NULL, 0);
diff --git a/src/firejail/fs_mkdir.c b/src/firejail/fs_mkdir.c
index b2a5927e6..cffe32a7a 100644
--- a/src/firejail/fs_mkdir.c
+++ b/src/firejail/fs_mkdir.c
@@ -81,7 +81,7 @@ void fs_mkdir(const char *name) {
81 81
82 // create directory 82 // create directory
83 mkdir_recursive(expanded); 83 mkdir_recursive(expanded);
84 exit(0); 84 _exit(0);
85 } 85 }
86 // wait for the child to finish 86 // wait for the child to finish
87 waitpid(child, NULL, 0); 87 waitpid(child, NULL, 0);
@@ -126,7 +126,7 @@ void fs_mkfile(const char *name) {
126 (void) rv; 126 (void) rv;
127 fclose(fp); 127 fclose(fp);
128 } 128 }
129 exit(0); 129 _exit(0);
130 } 130 }
131 // wait for the child to finish 131 // wait for the child to finish
132 waitpid(child, NULL, 0); 132 waitpid(child, NULL, 0);
diff --git a/src/firejail/fs_whitelist.c b/src/firejail/fs_whitelist.c
index b1c2774e2..8bbdbe5d3 100644
--- a/src/firejail/fs_whitelist.c
+++ b/src/firejail/fs_whitelist.c
@@ -822,6 +822,7 @@ void fs_whitelist(void) {
822 if (mount("tmpfs", RUN_WHITELIST_SRV_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME | MS_REC, "mode=755,gid=0") < 0) 822 if (mount("tmpfs", RUN_WHITELIST_SRV_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME | MS_REC, "mode=755,gid=0") < 0)
823 errExit("mount tmpfs"); 823 errExit("mount tmpfs");
824 fs_logger2("tmpfs", RUN_WHITELIST_SRV_DIR); 824 fs_logger2("tmpfs", RUN_WHITELIST_SRV_DIR);
825 }
825 826
826 if (new_name) 827 if (new_name)
827 free(new_name); 828 free(new_name);
diff --git a/src/firejail/ls.c b/src/firejail/ls.c
index 39efaa0a6..dba82be0b 100644
--- a/src/firejail/ls.c
+++ b/src/firejail/ls.c
@@ -358,7 +358,7 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
358 fprintf(stderr, "Error: Cannot read %s\n", fname1); 358 fprintf(stderr, "Error: Cannot read %s\n", fname1);
359 exit(1); 359 exit(1);
360 } 360 }
361 exit(0); 361 _exit(0);
362 } 362 }
363 363
364 // wait for the child to finish 364 // wait for the child to finish
@@ -391,7 +391,7 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
391 exit(1); 391 exit(1);
392 } 392 }
393 fclose(fp); 393 fclose(fp);
394 exit(0); 394 _exit(0);
395 } 395 }
396 396
397 // wait for the child to finish 397 // wait for the child to finish
@@ -445,7 +445,7 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
445 fprintf(stderr, "Error: Cannot read %s\n", src_fname); 445 fprintf(stderr, "Error: Cannot read %s\n", src_fname);
446 exit(1); 446 exit(1);
447 } 447 }
448 exit(0); 448 _exit(0);
449 } 449 }
450 450
451 // wait for the child to finish 451 // wait for the child to finish
@@ -494,7 +494,7 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
494 } 494 }
495 } 495 }
496 496
497 exit(0); 497 _exit(0);
498 } 498 }
499 499
500 // wait for the child to finish 500 // wait for the child to finish
diff --git a/src/firejail/main.c b/src/firejail/main.c
index 987a79d1c..b5a97c71e 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -2506,7 +2506,7 @@ int main(int argc, char **argv) {
2506 network_main(child); 2506 network_main(child);
2507 if (arg_debug) 2507 if (arg_debug)
2508 printf("Host network configured\n"); 2508 printf("Host network configured\n");
2509 exit(0); 2509 _exit(0);
2510 } 2510 }
2511 2511
2512 // wait for the child to finish 2512 // wait for the child to finish
@@ -2579,7 +2579,6 @@ int main(int argc, char **argv) {
2579 g = get_group_id("games"); 2579 g = get_group_id("games");
2580 if (g) { 2580 if (g) {
2581 sprintf(ptr, "%d %d 1\n", g, g); 2581 sprintf(ptr, "%d %d 1\n", g, g);
2582 ptr += strlen(ptr);
2583 } 2582 }
2584 2583
2585 EUID_ROOT(); 2584 EUID_ROOT();
diff --git a/src/firejail/netfilter.c b/src/firejail/netfilter.c
index b50d61039..c1f9a2c37 100644
--- a/src/firejail/netfilter.c
+++ b/src/firejail/netfilter.c
@@ -145,7 +145,8 @@ void netfilter(const char *fname) {
145 // wipe out environment variables 145 // wipe out environment variables
146 environ = NULL; 146 environ = NULL;
147 execl(iptables_restore, iptables_restore, NULL); 147 execl(iptables_restore, iptables_restore, NULL);
148 // it will never get here!!! 148 perror("execl");
149 _exit(1);
149 } 150 }
150 // wait for the child to finish 151 // wait for the child to finish
151 waitpid(child, NULL, 0); 152 waitpid(child, NULL, 0);
@@ -163,7 +164,8 @@ void netfilter(const char *fname) {
163 errExit("setregid"); 164 errExit("setregid");
164 environ = NULL; 165 environ = NULL;
165 execl(iptables, iptables, "-vL", NULL); 166 execl(iptables, iptables, "-vL", NULL);
166 // it will never get here!!! 167 perror("execl");
168 _exit(1);
167 } 169 }
168 // wait for the child to finish 170 // wait for the child to finish
169 waitpid(child, NULL, 0); 171 waitpid(child, NULL, 0);
@@ -256,7 +258,8 @@ void netfilter6(const char *fname) {
256 // wipe out environment variables 258 // wipe out environment variables
257 environ = NULL; 259 environ = NULL;
258 execl(ip6tables_restore, ip6tables_restore, NULL); 260 execl(ip6tables_restore, ip6tables_restore, NULL);
259 // it will never get here!!! 261 perror("execl");
262 _exit(1);
260 } 263 }
261 // wait for the child to finish 264 // wait for the child to finish
262 waitpid(child, NULL, 0); 265 waitpid(child, NULL, 0);
@@ -269,7 +272,8 @@ void netfilter6(const char *fname) {
269 if (child == 0) { 272 if (child == 0) {
270 environ = NULL; 273 environ = NULL;
271 execl(ip6tables, ip6tables, "-vL", NULL); 274 execl(ip6tables, ip6tables, "-vL", NULL);
272 // it will never get here!!! 275 perror("execl");
276 _exit(1);
273 } 277 }
274 // wait for the child to finish 278 // wait for the child to finish
275 waitpid(child, NULL, 0); 279 waitpid(child, NULL, 0);
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c
index 8021ce9a3..f5cca7494 100644
--- a/src/firejail/sandbox.c
+++ b/src/firejail/sandbox.c
@@ -488,6 +488,13 @@ int sandbox(void* sandbox_arg) {
488#ifdef HAVE_SECCOMP 488#ifdef HAVE_SECCOMP
489 int enforce_seccomp = 0; 489 int enforce_seccomp = 0;
490#endif 490#endif
491 if (arg_appimage) {
492 enforce_filters();
493#ifdef HAVE_SECCOMP
494 enforce_seccomp = 1;
495#endif
496 }
497
491#ifdef HAVE_CHROOT 498#ifdef HAVE_CHROOT
492 if (cfg.chrootdir) { 499 if (cfg.chrootdir) {
493 fs_chroot(cfg.chrootdir); 500 fs_chroot(cfg.chrootdir);
diff --git a/src/firejail/x11.c b/src/firejail/x11.c
index d40d349e1..c79f1a74e 100644
--- a/src/firejail/x11.c
+++ b/src/firejail/x11.c
@@ -314,7 +314,7 @@ void x11_start_xephyr(int argc, char **argv) {
314 314
315 execvp(server_argv[0], server_argv); 315 execvp(server_argv[0], server_argv);
316 perror("execvp"); 316 perror("execvp");
317 exit(1); 317 _exit(1);
318 } 318 }
319 319
320 if (arg_debug) 320 if (arg_debug)
@@ -355,7 +355,7 @@ void x11_start_xephyr(int argc, char **argv) {
355 355
356 execvp(jail_argv[0], jail_argv); 356 execvp(jail_argv[0], jail_argv);
357 perror("execvp"); 357 perror("execvp");
358 exit(1); 358 _exit(1);
359 } 359 }
360 360
361 // cleanup 361 // cleanup
@@ -434,7 +434,7 @@ void x11_start_xpra(int argc, char **argv) {
434 434
435 execvp(server_argv[0], server_argv); 435 execvp(server_argv[0], server_argv);
436 perror("execvp"); 436 perror("execvp");
437 exit(1); 437 _exit(1);
438 } 438 }
439 439
440 // check X11 socket 440 // check X11 socket
@@ -480,7 +480,7 @@ void x11_start_xpra(int argc, char **argv) {
480 480
481 execvp(attach_argv[0], attach_argv); 481 execvp(attach_argv[0], attach_argv);
482 perror("execvp"); 482 perror("execvp");
483 exit(1); 483 _exit(1);
484 } 484 }
485 485
486 setenv("DISPLAY", display_str, 1); 486 setenv("DISPLAY", display_str, 1);
@@ -536,7 +536,7 @@ void x11_start_xpra(int argc, char **argv) {
536 } 536 }
537 execvp(stop_argv[0], stop_argv); 537 execvp(stop_argv[0], stop_argv);
538 perror("execvp"); 538 perror("execvp");
539 exit(1); 539 _exit(1);
540 } 540 }
541 541
542 // wait for xpra server to stop, 10 seconds limit 542 // wait for xpra server to stop, 10 seconds limit
@@ -672,7 +672,7 @@ void x11_xorg(void) {
672 execlp("/usr/bin/xauth", "/usr/bin/xauth", "-f", RUN_XAUTHORITY_SEC_FILE, 672 execlp("/usr/bin/xauth", "/usr/bin/xauth", "-f", RUN_XAUTHORITY_SEC_FILE,
673 "generate", display, "MIT-MAGIC-COOKIE-1", "untrusted", NULL); 673 "generate", display, "MIT-MAGIC-COOKIE-1", "untrusted", NULL);
674 674
675 exit(0); 675 _exit(0);
676 } 676 }
677 // wait for the child to finish 677 // wait for the child to finish
678 waitpid(child, NULL, 0); 678 waitpid(child, NULL, 0);
diff --git a/src/firemon/interface.c b/src/firemon/interface.c
index 5a89e1491..bceed93d3 100644
--- a/src/firemon/interface.c
+++ b/src/firemon/interface.c
@@ -146,7 +146,7 @@ static void print_sandbox(pid_t pid) {
146 return; 146 return;
147 net_ifprint(); 147 net_ifprint();
148 printf("\n"); 148 printf("\n");
149 exit(0); 149 _exit(0);
150 } 150 }
151 151
152 // wait for the child to finish 152 // wait for the child to finish
diff --git a/src/firemon/procevent.c b/src/firemon/procevent.c
index 188c10183..78a3a4fb2 100644
--- a/src/firemon/procevent.c
+++ b/src/firemon/procevent.c
@@ -28,6 +28,8 @@
28#include <arpa/inet.h> 28#include <arpa/inet.h>
29#include <time.h> 29#include <time.h>
30#include <fcntl.h> 30#include <fcntl.h>
31#include <sys/uio.h>
32
31#define PIDS_BUFLEN 4096 33#define PIDS_BUFLEN 4096
32#define SERVER_PORT 889 // 889-899 is left unassigned by IANA 34#define SERVER_PORT 889 // 889-899 is left unassigned by IANA
33 35
diff --git a/src/man/firejail-login.txt b/src/man/firejail-login.txt
index 691217253..796179d0b 100644
--- a/src/man/firejail-login.txt
+++ b/src/man/firejail-login.txt
@@ -13,6 +13,10 @@ Example:
13 13
14 netblue:--net=none --protocol=unix 14 netblue:--net=none --protocol=unix
15 15
16Wildcard patterns are accepted in the user name field:
17
18 user*: --private
19
16.SH RESTRICTED SHELL 20.SH RESTRICTED SHELL
17To configure a restricted shell, replace /bin/bash with /usr/bin/firejail in 21To configure a restricted shell, replace /bin/bash with /usr/bin/firejail in
18/etc/passwd file for each user that needs to be restricted. Alternatively, 22/etc/passwd file for each user that needs to be restricted. Alternatively,
diff --git a/test/filters/noroot.exp b/test/filters/noroot.exp
index 2a7cb7975..b011f2bf9 100755
--- a/test/filters/noroot.exp
+++ b/test/filters/noroot.exp
@@ -46,20 +46,20 @@ expect {
46} 46}
47send -- "sudo -s\r" 47send -- "sudo -s\r"
48expect { 48expect {
49 timeout {puts "TESTING ERROR 8\n";exit} 49 timeout {puts "TESTING ERROR 7\n";exit}
50 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";} 50 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";}
51 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";} 51 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";}
52 "Bad system call" { puts "OK\n";} 52 "Bad system call" { puts "OK\n";}
53} 53}
54send -- "cat /proc/self/uid_map | wc -l\r" 54send -- "cat /proc/self/uid_map | wc -l\r"
55expect { 55expect {
56 timeout {puts "TESTING ERROR 7\n";exit} 56 timeout {puts "TESTING ERROR 8\n";exit}
57 "1" 57 "1"
58} 58}
59send -- "cat /proc/self/gid_map | wc -l\r" 59send -- "cat /proc/self/gid_map | wc -l\r"
60expect { 60expect {
61 timeout {puts "TESTING ERROR 8\n";exit} 61 timeout {puts "TESTING ERROR 9\n";exit}
62 "3" 62 "5"
63} 63}
64 64
65puts "\n" 65puts "\n"
@@ -70,59 +70,59 @@ sleep 2
70 70
71send -- "firejail --name=test --noroot --noprofile\r" 71send -- "firejail --name=test --noroot --noprofile\r"
72expect { 72expect {
73 timeout {puts "TESTING ERROR 9\n";exit} 73 timeout {puts "TESTING ERROR 10\n";exit}
74 "Child process initialized" 74 "Child process initialized"
75} 75}
76sleep 1 76sleep 1
77 77
78send -- "cat /proc/self/status\r" 78send -- "cat /proc/self/status\r"
79expect { 79expect {
80 timeout {puts "TESTING ERROR 10\n";exit} 80 timeout {puts "TESTING ERROR 11\n";exit}
81 "CapBnd:" 81 "CapBnd:"
82} 82}
83expect { 83expect {
84 timeout {puts "TESTING ERROR 11\n";exit} 84 timeout {puts "TESTING ERROR 12\n";exit}
85 "ffffffff" 85 "ffffffff"
86} 86}
87expect { 87expect {
88 timeout {puts "TESTING ERROR 12\n";exit} 88 timeout {puts "TESTING ERROR 13\n";exit}
89 "Seccomp:" 89 "Seccomp:"
90} 90}
91expect { 91expect {
92 timeout {puts "TESTING ERROR 13\n";exit} 92 timeout {puts "TESTING ERROR 14\n";exit}
93 "0" 93 "0"
94} 94}
95expect { 95expect {
96 timeout {puts "TESTING ERROR 14\n";exit} 96 timeout {puts "TESTING ERROR 15\n";exit}
97 "Cpus_allowed:" 97 "Cpus_allowed:"
98} 98}
99puts "\n" 99puts "\n"
100 100
101send -- "whoami\r" 101send -- "whoami\r"
102expect { 102expect {
103 timeout {puts "TESTING ERROR 15\n";exit} 103 timeout {puts "TESTING ERROR 16\n";exit}
104 $env(USER) 104 $env(USER)
105} 105}
106send -- "sudo -s\r" 106send -- "sudo -s\r"
107expect { 107expect {
108 timeout {puts "TESTING ERROR 16\n";exit} 108 timeout {puts "TESTING ERROR 17\n";exit}
109 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";} 109 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";}
110 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";} 110 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";}
111} 111}
112send -- "ping 0\r" 112send -- "ping 0\r"
113expect { 113expect {
114 timeout {puts "TESTING ERROR 17\n";exit} 114 timeout {puts "TESTING ERROR 18\n";exit}
115 "Operation not permitted" 115 "Operation not permitted"
116} 116}
117send -- "cat /proc/self/uid_map | wc -l\r" 117send -- "cat /proc/self/uid_map | wc -l\r"
118expect { 118expect {
119 timeout {puts "TESTING ERROR 18\n";exit} 119 timeout {puts "TESTING ERROR 19\n";exit}
120 "1" 120 "1"
121} 121}
122send -- "cat /proc/self/gid_map | wc -l\r" 122send -- "cat /proc/self/gid_map | wc -l\r"
123expect { 123expect {
124 timeout {puts "TESTING ERROR 19\n";exit} 124 timeout {puts "TESTING ERROR 20\n";exit}
125 "3" 125 "5"
126} 126}
127 127
128 128
@@ -130,31 +130,31 @@ expect {
130spawn $env(SHELL) 130spawn $env(SHELL)
131send -- "firejail --debug --join=test\r" 131send -- "firejail --debug --join=test\r"
132expect { 132expect {
133 timeout {puts "TESTING ERROR 20\n";exit} 133 timeout {puts "TESTING ERROR 21\n";exit}
134 "User namespace detected" 134 "User namespace detected"
135} 135}
136expect { 136expect {
137 timeout {puts "TESTING ERROR 21\n";exit} 137 timeout {puts "TESTING ERROR 22\n";exit}
138 "Joining user namespace" 138 "Joining user namespace"
139} 139}
140sleep 1 140sleep 1
141 141
142send -- "sudo -s\r" 142send -- "sudo -s\r"
143expect { 143expect {
144 timeout {puts "TESTING ERROR 22\n";exit} 144 timeout {puts "TESTING ERROR 23\n";exit}
145 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";} 145 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";}
146 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";} 146 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";}
147 "Permission denied" { puts "OK\n";} 147 "Permission denied" { puts "OK\n";}
148} 148}
149send -- "cat /proc/self/uid_map | wc -l\r" 149send -- "cat /proc/self/uid_map | wc -l\r"
150expect { 150expect {
151 timeout {puts "TESTING ERROR 23\n";exit} 151 timeout {puts "TESTING ERROR 24\n";exit}
152 "1" 152 "1"
153} 153}
154send -- "cat /proc/self/gid_map | wc -l\r" 154send -- "cat /proc/self/gid_map | wc -l\r"
155expect { 155expect {
156 timeout {puts "TESTING ERROR 24\n";exit} 156 timeout {puts "TESTING ERROR 25\n";exit}
157 "3" 157 "5"
158} 158}
159after 100 159after 100
160puts "\nall done\n" 160puts "\nall done\n"
diff --git a/test/fs/fs.sh b/test/fs/fs.sh
index d45ef48bd..3139b8eae 100755
--- a/test/fs/fs.sh
+++ b/test/fs/fs.sh
@@ -6,6 +6,9 @@
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) 7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8 8
9echo "TESTING: /sys/fs access (test/fs/sys_fs.exp)"
10./sys_fs.exp
11
9echo "TESTING: kmsg access (test/fs/kmsg.exp)" 12echo "TESTING: kmsg access (test/fs/kmsg.exp)"
10./kmsg.exp 13./kmsg.exp
11 14
diff --git a/test/fs/sys_fs.exp b/test/fs/sys_fs.exp
new file mode 100755
index 000000000..f512776d9
--- /dev/null
+++ b/test/fs/sys_fs.exp
@@ -0,0 +1,44 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail\r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17send -- "ls /sys/fs\r"
18expect {
19 timeout {puts "TESTING ERROR 2\n";exit}
20 "Permission denied"
21}
22after 100
23
24send -- "exit\r"
25sleep 1
26
27send -- "firejail --noblacklist=/sys/fs\r"
28expect {
29 timeout {puts "TESTING ERROR 1\n";exit}
30 "Child process initialized"
31}
32sleep 1
33
34send -- "ls /sys/fs\r"
35expect {
36 timeout {puts "TESTING ERROR 2\n";exit}
37 "cgroup"
38}
39after 100
40send -- "exit\r"
41after 100
42
43puts "\nall done\n"
44