aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in3
-rw-r--r--README9
-rw-r--r--README.md2
-rw-r--r--RELNOTES3
-rw-r--r--etc/firejail.config6
-rw-r--r--etc/gnome-chess.profile6
-rw-r--r--etc/strings.profile10
-rw-r--r--platform/debian/conffiles1
-rw-r--r--src/firejail/checkcfg.c7
-rw-r--r--src/firejail/env.c2
-rw-r--r--src/firejail/fs.c10
-rwxr-xr-xtest/compile/compile.sh243
-rwxr-xr-xtest/sysutils/sysutils.sh16
-rw-r--r--todo13
14 files changed, 53 insertions, 278 deletions
diff --git a/Makefile.in b/Makefile.in
index 6c98742b7..1142059a5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -160,9 +160,6 @@ snap: all
160install-snap: snap 160install-snap: snap
161 sudo snap remove faudit; sudo snap install faudit*.snap 161 sudo snap remove faudit; sudo snap install faudit*.snap
162 162
163github-compile:
164 cd test/compile; ./compile.sh
165
166dist-compile: dist 163dist-compile: dist
167 cd test/dist-compile; ./compile.sh $(NAME)-$(VERSION) 164 cd test/dist-compile; ./compile.sh $(NAME)-$(VERSION)
168 165
diff --git a/README b/README
index 6e6411619..4145d5165 100644
--- a/README
+++ b/README
@@ -158,6 +158,7 @@ yumkam (https://github.com/yumkam)
158 - man page fixes 158 - man page fixes
159mahdi1234 (https://github.com/mahdi1234) 159mahdi1234 (https://github.com/mahdi1234)
160 - cherrytree profile 160 - cherrytree profile
161 - Seamonkey profiles
161jrabe (https://github.com/jrabe) 162jrabe (https://github.com/jrabe)
162 - disallow access to kdbx files 163 - disallow access to kdbx files
163 - Epiphany profile 164 - Epiphany profile
@@ -176,6 +177,7 @@ pszxzsd (https://github.com/pszxzsd)
176Rahiel Kasim (https://github.com/rahiel) 177Rahiel Kasim (https://github.com/rahiel)
177 - Mathematica profile 178 - Mathematica profile
178 - whitelisted Dropbox profile 179 - whitelisted Dropbox profile
180 - whitelisted keysnail config for firefox
179creideiki (https://github.com/creideiki) 181creideiki (https://github.com/creideiki)
180 - make the sandbox process reap all children 182 - make the sandbox process reap all children
181sinkuu (https://github.com/sinkuu) 183sinkuu (https://github.com/sinkuu)
@@ -187,8 +189,7 @@ Holger Heinz (https://github.com/hheinz)
187 - manpage work 189 - manpage work
188Andrey Alekseenko (https://github.com/al42and) 190Andrey Alekseenko (https://github.com/al42and)
189 - fixing lintian warnings 191 - fixing lintian warnings
190mahdi1234 (https://github.com/mahdi1234) 192 - fixed Skype profile
191 - Seamonkey profiles
192Ivan Kozik (https://github.com/ivan) 193Ivan Kozik (https://github.com/ivan)
193 - speed up sandbox exit 194 - speed up sandbox exit
194Christian Stadelmann (https://github.com/genodeftest) 195Christian Stadelmann (https://github.com/genodeftest)
@@ -199,8 +200,6 @@ Kaan Genç (https://github.com/SeriousBug)
199 - dynamic allocation of noblacklist buffer 200 - dynamic allocation of noblacklist buffer
200Veeti Paananen (https://github.com/veeti) 201Veeti Paananen (https://github.com/veeti)
201 - fixed Spotify profile 202 - fixed Spotify profile
202Rahiel Kasim (https://github.com/rahiel)
203 - whitelist keysnail config for firefox
204rogshdo (https://github.com/rogshdo) 203rogshdo (https://github.com/rogshdo)
205 - BitlBee profile 204 - BitlBee profile
206Bruno Nova (https://github.com/brunonova) 205Bruno Nova (https://github.com/brunonova)
@@ -208,8 +207,6 @@ Bruno Nova (https://github.com/brunonova)
208 - bash arguments fix 207 - bash arguments fix
209Matt Parnell (https://github.com/ilikenwf) 208Matt Parnell (https://github.com/ilikenwf)
210 - whitelisting for core firefox related functionality 209 - whitelisting for core firefox related functionality
211Andrey Alekseenko (https://github.com/al42and)
212 - fixed Skype profile
213Ondra Nekola (https://github.com/satai) 210Ondra Nekola (https://github.com/satai)
214 - allow firefox theming with non-global themes 211 - allow firefox theming with non-global themes
215emacsomancer (https://github.com/emacsomancer) 212emacsomancer (https://github.com/emacsomancer)
diff --git a/README.md b/README.md
index 67dd017a7..3047bf908 100644
--- a/README.md
+++ b/README.md
@@ -196,6 +196,6 @@ Browsers: Palemoon
196 196
197## New security profiles 197## New security profiles
198 198
199Gitter, gThumb, mpv, Franz messenger, LibreOffice, pix, audacity, strings, xz, xzdec, gzip, cpio, less, Atom Beta, Atom, jitsi, eom, uudeview 199Gitter, gThumb, mpv, Franz messenger, LibreOffice, pix, audacity, xz, xzdec, gzip, cpio, less, Atom Beta, Atom, jitsi, eom, uudeview
200tar (gtar), unzip, unrar, file, skypeforlinux, gnome-chess 200tar (gtar), unzip, unrar, file, skypeforlinux, gnome-chess
201 201
diff --git a/RELNOTES b/RELNOTES
index 77270987e..79f634dcd 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -18,9 +18,10 @@ firejail (0.9.42~rc2) baseline; urgency=low
18 * seccomp filter updated 18 * seccomp filter updated
19 * compile time and run time support to disable whitelists 19 * compile time and run time support to disable whitelists
20 * compile time support to disable global configuration file 20 * compile time support to disable global configuration file
21 * added quiet-by-default config option in /etc/firejail/firejail.config
21 * added netfilter-default config option in /etc/firejail/firejail.config 22 * added netfilter-default config option in /etc/firejail/firejail.config
22 * new profiles: Gitter, gThumb, mpv, Franz messenger, LibreOffice 23 * new profiles: Gitter, gThumb, mpv, Franz messenger, LibreOffice
23 * new profiles: pix, audacity, strings, xz, xzdec, gzip, cpio, less 24 * new profiles: pix, audacity, xz, xzdec, gzip, cpio, less
24 * new profiles: Atom Beta, Atom, jitsi, eom, uudeview 25 * new profiles: Atom Beta, Atom, jitsi, eom, uudeview
25 * new profiles: tar (gtar), unzip, unrar, file, skypeforlinux 26 * new profiles: tar (gtar), unzip, unrar, file, skypeforlinux
26 -- netblue30 <netblue30@yahoo.com> Thu, 21 Jul 2016 08:00:00 -0500 27 -- netblue30 <netblue30@yahoo.com> Thu, 21 Jul 2016 08:00:00 -0500
diff --git a/etc/firejail.config b/etc/firejail.config
index 20c4d7a5f..82fe65ac7 100644
--- a/etc/firejail.config
+++ b/etc/firejail.config
@@ -15,12 +15,16 @@
15# Force use of nonewprivs. This mitigates the possibility of 15# Force use of nonewprivs. This mitigates the possibility of
16# a user abusing firejail's features to trick a privileged (suid 16# a user abusing firejail's features to trick a privileged (suid
17# or file capabilities) process into loading code or configuration 17# or file capabilities) process into loading code or configuration
18# that is partially under their control. Default disabled 18# that is partially under their control. Default disabled.
19# force-nonewprivs no 19# force-nonewprivs no
20 20
21# Enable or disable networking features, default enabled. 21# Enable or disable networking features, default enabled.
22# network yes 22# network yes
23 23
24# Enable --quiet as default every time the sandbox is started. Default disabled.
25# quiet-by-default no
26
27
24# Enable or disable restricted network support, default disabled. If enabled, 28# Enable or disable restricted network support, default disabled. If enabled,
25# networking features should also be enabled (network yes). 29# networking features should also be enabled (network yes).
26# Restricted networking grants access to --interface, --net=ethXXX and 30# Restricted networking grants access to --interface, --net=ethXXX and
diff --git a/etc/gnome-chess.profile b/etc/gnome-chess.profile
index e93970f7d..297f7e6a9 100644
--- a/etc/gnome-chess.profile
+++ b/etc/gnome-chess.profile
@@ -7,14 +7,16 @@ 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
10net none
11nogroups 10nogroups
12nonewprivs 11nonewprivs
13noroot 12noroot
14nosound 13nosound
14protocol unix
15seccomp 15seccomp
16shell none 16shell none
17tracelog 17tracelog
18 18
19private-bin gnome-chess 19private-bin fairymax,gnome-chess,hoichess
20private-dev 20private-dev
21private-etc fonts,gnome-chess
22private-tmp
diff --git a/etc/strings.profile b/etc/strings.profile
deleted file mode 100644
index 6ebe81d09..000000000
--- a/etc/strings.profile
+++ /dev/null
@@ -1,10 +0,0 @@
1# strings profile
2quiet
3ignore noroot
4include /etc/firejail/default.profile
5tracelog
6net none
7shell none
8private-dev
9private-tmp
10nosound
diff --git a/platform/debian/conffiles b/platform/debian/conffiles
index d2ee3a83e..633123e92 100644
--- a/platform/debian/conffiles
+++ b/platform/debian/conffiles
@@ -111,7 +111,6 @@
111/etc/firejail/ssh.profile 111/etc/firejail/ssh.profile
112/etc/firejail/steam.profile 112/etc/firejail/steam.profile
113/etc/firejail/stellarium.profile 113/etc/firejail/stellarium.profile
114/etc/firejail/strings.profile
115/etc/firejail/tar.profile 114/etc/firejail/tar.profile
116/etc/firejail/telegram.profile 115/etc/firejail/telegram.profile
117/etc/firejail/thunderbird.profile 116/etc/firejail/thunderbird.profile
diff --git a/src/firejail/checkcfg.c b/src/firejail/checkcfg.c
index 12921e294..3b60dafb6 100644
--- a/src/firejail/checkcfg.c
+++ b/src/firejail/checkcfg.c
@@ -220,7 +220,12 @@ int checkcfg(int val) {
220 if (!xephyr_extra_params) 220 if (!xephyr_extra_params)
221 errExit("strdup"); 221 errExit("strdup");
222 } 222 }
223 223
224 // quiet by default
225 else if (strncmp(ptr, "quiet-by-default ", 17) == 0) {
226 if (strcmp(ptr + 17, "yes") == 0)
227 arg_quiet = 1;
228 }
224 else 229 else
225 goto errout; 230 goto errout;
226 231
diff --git a/src/firejail/env.c b/src/firejail/env.c
index a5b3ccfb3..79d6b81e3 100644
--- a/src/firejail/env.c
+++ b/src/firejail/env.c
@@ -133,7 +133,7 @@ void env_defaults(void) {
133 errExit("setenv"); 133 errExit("setenv");
134 134
135 // set the window title 135 // set the window title
136 printf("\033]0;firejail %s\007\n", cfg.window_title); 136 printf("\033]0;firejail %s\007", cfg.window_title);fflush(0);
137} 137}
138 138
139// parse and store the environment setting 139// parse and store the environment setting
diff --git a/src/firejail/fs.c b/src/firejail/fs.c
index 5bcfa6066..86126672e 100644
--- a/src/firejail/fs.c
+++ b/src/firejail/fs.c
@@ -1064,6 +1064,16 @@ int fs_check_chroot_dir(const char *rootdir) {
1064 struct stat s; 1064 struct stat s;
1065 char *name; 1065 char *name;
1066 1066
1067 // rootdir has to be owned by root
1068 if (stat(rootdir, &s) != 0) {
1069 fprintf(stderr, "Error: cannot find chroot directory\n");
1070 return 1;
1071 }
1072 if (s.st_uid != 0) {
1073 fprintf(stderr, "Error: chroot directory should be owned by root\n");
1074 return 1;
1075 }
1076
1067 // check /dev 1077 // check /dev
1068 if (asprintf(&name, "%s/dev", rootdir) == -1) 1078 if (asprintf(&name, "%s/dev", rootdir) == -1)
1069 errExit("asprintf"); 1079 errExit("asprintf");
diff --git a/test/compile/compile.sh b/test/compile/compile.sh
deleted file mode 100755
index 1207ef518..000000000
--- a/test/compile/compile.sh
+++ /dev/null
@@ -1,243 +0,0 @@
1#!/bin/bash
2
3arr[1]="TEST 1: standard compilation"
4arr[2]="TEST 2: compile seccomp disabled"
5arr[3]="TEST 3: compile chroot disabled"
6arr[4]="TEST 4: compile bind disabled"
7arr[5]="TEST 5: compile user namespace disabled"
8arr[6]="TEST 6: compile network disabled"
9arr[7]="TEST 7: compile X11 disabled"
10arr[8]="TEST 8: compile network restricted"
11arr[9]="TEST 9: compile file transfer disabled"
12
13
14# remove previous reports and output file
15cleanup() {
16 rm -f report*
17 rm -fr firejail
18 rm -f oc* om*
19}
20
21print_title() {
22 echo
23 echo
24 echo
25 echo "**************************************************"
26 echo $1
27 echo "**************************************************"
28}
29
30while [ $# -gt 0 ]; do # Until you run out of parameters . . .
31 case "$1" in
32 --clean)
33 cleanup
34 exit
35 ;;
36 --help)
37 echo "./compile.sh [--clean|--help]"
38 exit
39 ;;
40 esac
41 shift # Check next set of parameters.
42done
43
44cleanup
45
46#*****************************************************************
47# TEST 1
48#*****************************************************************
49# - checkout source code
50# - check compilation
51# - install
52#*****************************************************************
53print_title "${arr[1]}"
54git clone https://github.com/netblue30/firejail.git
55cd firejail
56./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure
57make -j4 2>&1 | tee ../output-make
58cd ..
59grep Warning output-configure output-make > ./report-test1
60grep Error output-configure output-make >> ./report-test1
61cp output-configure oc1
62cp output-make om1
63rm output-configure output-make
64
65
66#*****************************************************************
67# TEST 2
68#*****************************************************************
69# - disable seccomp configuration
70# - check compilation
71#*****************************************************************
72print_title "${arr[2]}"
73# seccomp
74cd firejail
75make distclean
76./configure --prefix=/usr --disable-seccomp --enable-fatal-warnings 2>&1 | tee ../output-configure
77make -j4 2>&1 | tee ../output-make
78cd ..
79grep Warning output-configure output-make > ./report-test2
80grep Error output-configure output-make >> ./report-test2
81cp output-configure oc2
82cp output-make om2
83rm output-configure output-make
84
85#*****************************************************************
86# TEST 3
87#*****************************************************************
88# - disable chroot configuration
89# - check compilation
90#*****************************************************************
91print_title "${arr[3]}"
92# seccomp
93cd firejail
94make distclean
95./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure
96make -j4 2>&1 | tee ../output-make
97cd ..
98grep Warning output-configure output-make > ./report-test3
99grep Error output-configure output-make >> ./report-test3
100cp output-configure oc3
101cp output-make om3
102rm output-configure output-make
103
104#*****************************************************************
105# TEST 4
106#*****************************************************************
107# - disable bind configuration
108# - check compilation
109#*****************************************************************
110print_title "${arr[4]}"
111# seccomp
112cd firejail
113make distclean
114./configure --prefix=/usr --disable-bind --enable-fatal-warnings 2>&1 | tee ../output-configure
115make -j4 2>&1 | tee ../output-make
116cd ..
117grep Warning output-configure output-make > ./report-test4
118grep Error output-configure output-make >> ./report-test4
119cp output-configure oc4
120cp output-make om4
121rm output-configure output-make
122
123#*****************************************************************
124# TEST 5
125#*****************************************************************
126# - disable user namespace configuration
127# - check compilation
128#*****************************************************************
129print_title "${arr[5]}"
130# seccomp
131cd firejail
132make distclean
133./configure --prefix=/usr --disable-userns --enable-fatal-warnings 2>&1 | tee ../output-configure
134make -j4 2>&1 | tee ../output-make
135cd ..
136grep Warning output-configure output-make > ./report-test5
137grep Error output-configure output-make >> ./report-test5
138cp output-configure oc5
139cp output-make om5
140rm output-configure output-make
141
142#*****************************************************************
143# TEST 6
144#*****************************************************************
145# - disable user namespace configuration
146# - check compilation
147#*****************************************************************
148print_title "${arr[6]}"
149# seccomp
150cd firejail
151make distclean
152./configure --prefix=/usr --disable-network --enable-fatal-warnings 2>&1 | tee ../output-configure
153make -j4 2>&1 | tee ../output-make
154cd ..
155grep Warning output-configure output-make > ./report-test6
156grep Error output-configure output-make >> ./report-test6
157cp output-configure oc6
158cp output-make om6
159rm output-configure output-make
160
161#*****************************************************************
162# TEST 7
163#*****************************************************************
164# - disable X11 support
165# - check compilation
166#*****************************************************************
167print_title "${arr[7]}"
168# seccomp
169cd firejail
170make distclean
171./configure --prefix=/usr --disable-x11 --enable-fatal-warnings 2>&1 | tee ../output-configure
172make -j4 2>&1 | tee ../output-make
173cd ..
174grep Warning output-configure output-make > ./report-test7
175grep Error output-configure output-make >> ./report-test7
176cp output-configure oc7
177cp output-make om7
178rm output-configure output-make
179
180
181#*****************************************************************
182# TEST 8
183#*****************************************************************
184# - enable network restricted
185# - check compilation
186#*****************************************************************
187print_title "${arr[8]}"
188# seccomp
189cd firejail
190make distclean
191./configure --prefix=/usr --enable-network=restricted --enable-fatal-warnings 2>&1 | tee ../output-configure
192make -j4 2>&1 | tee ../output-make
193cd ..
194grep Warning output-configure output-make > ./report-test8
195grep Error output-configure output-make >> ./report-test8
196cp output-configure oc8
197cp output-make om8
198rm output-configure output-make
199
200
201#*****************************************************************
202# TEST 9
203#*****************************************************************
204# - disable file transfer
205# - check compilation
206#*****************************************************************
207print_title "${arr[9]}"
208# seccomp
209cd firejail
210make distclean
211./configure --prefix=/usr --enable-network=restricted --enable-fatal-warnings 2>&1 | tee ../output-configure
212make -j4 2>&1 | tee ../output-make
213cd ..
214grep Warning output-configure output-make > ./report-test9
215grep Error output-configure output-make >> ./report-test9
216cp output-configure oc9
217cp output-make om9
218rm output-configure output-make
219
220
221#*****************************************************************
222# PRINT REPORTS
223#*****************************************************************
224echo
225echo
226echo
227echo
228echo "**********************************************************"
229echo "TEST RESULTS"
230echo "**********************************************************"
231
232wc -l report-test*
233echo
234echo "Legend:"
235echo ${arr[1]}
236echo ${arr[2]}
237echo ${arr[3]}
238echo ${arr[4]}
239echo ${arr[5]}
240echo ${arr[6]}
241echo ${arr[7]}
242echo ${arr[8]}
243echo ${arr[9]}
diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh
index 315b73c9d..99939133d 100755
--- a/test/sysutils/sysutils.sh
+++ b/test/sysutils/sysutils.sh
@@ -15,14 +15,14 @@ else
15 echo "TESTING SKIP: cpio not found" 15 echo "TESTING SKIP: cpio not found"
16fi 16fi
17 17
18which strings 18#which strings
19if [ "$?" -eq 0 ]; 19#if [ "$?" -eq 0 ];
20then 20#then
21 echo "TESTING: strings" 21# echo "TESTING: strings"
22 ./strings.exp 22# ./strings.exp
23else 23#else
24 echo "TESTING SKIP: strings not found" 24# echo "TESTING SKIP: strings not found"
25fi 25#fi
26 26
27which gzip 27which gzip
28if [ "$?" -eq 0 ]; 28if [ "$?" -eq 0 ];
diff --git a/todo b/todo
index 323374525..8fe3904da 100644
--- a/todo
+++ b/todo
@@ -266,3 +266,16 @@ $ sudo aa-notify -p -f /var/log/audit/audit.log
26624. check monitor proc behaviour for sandboxes with --blacklist=/proc 26624. check monitor proc behaviour for sandboxes with --blacklist=/proc
267also check --apparmor in this case 267also check --apparmor in this case
268 268
26925. bring back strings.profile
270
271# strings profile
272quiet
273ignore noroot
274include /etc/firejail/default.profile
275tracelog
276net none
277shell none
278private-dev
279private-tmp
280nosound
281