aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-06-12 11:58:59 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-06-12 11:58:59 -0400
commita137cfb715fab07a2e21cf2a0770d1afcd2e2119 (patch)
treeeca38e162a3b898aa4603164e2f3e227a3058b8a
parentsupport to disable enforcing firejail.config (diff)
downloadfirejail-a137cfb715fab07a2e21cf2a0770d1afcd2e2119.tar.gz
firejail-a137cfb715fab07a2e21cf2a0770d1afcd2e2119.tar.zst
firejail-a137cfb715fab07a2e21cf2a0770d1afcd2e2119.zip
fixes
-rw-r--r--README2
-rw-r--r--src/firejail/fs.c6
-rwxr-xr-xtest/dist-compile/compile.sh45
3 files changed, 45 insertions, 8 deletions
diff --git a/README b/README
index 05c9408ec..0f825fd8e 100644
--- a/README
+++ b/README
@@ -25,6 +25,8 @@ Reiner Herrmann (https://github.com/reinerh)
25 - clang-analyzer fixes 25 - clang-analyzer fixes
26 - Debian reproducible build 26 - Debian reproducible build
27 - unit testing framework 27 - unit testing framework
28geg2048 (https://github.com/geg2048)
29 - kwallet profile fixes
28Simon Peter (https://github.com/probonopd) 30Simon Peter (https://github.com/probonopd)
29 - set $APPIMAGE and $APPDIR environment variables 31 - set $APPIMAGE and $APPDIR environment variables
30maces (https://github.com/maces) 32maces (https://github.com/maces)
diff --git a/src/firejail/fs.c b/src/firejail/fs.c
index acc03e412..7811fd2a2 100644
--- a/src/firejail/fs.c
+++ b/src/firejail/fs.c
@@ -725,8 +725,6 @@ void fs_basic_fs(void) {
725 // firejail sandboxes (firejail --force) 725 // firejail sandboxes (firejail --force)
726 if (getuid() != 0) 726 if (getuid() != 0)
727 disable_firejail_config(); 727 disable_firejail_config();
728 else
729 fprintf(stderr, "Warning: masking /etc/firejail disabled when starting the sandbox as root\n");
730 728
731 if (getuid() == 0) 729 if (getuid() == 0)
732 fs_rdwr(); 730 fs_rdwr();
@@ -964,8 +962,6 @@ void fs_overlayfs(void) {
964 // firejail sandboxes (firejail --force) 962 // firejail sandboxes (firejail --force)
965 if (getuid() != 0) 963 if (getuid() != 0)
966 disable_firejail_config(); 964 disable_firejail_config();
967 else
968 fprintf(stderr, "Warning: masking /etc/firejail disabled when starting the sandbox as root\n");
969 965
970 // cleanup and exit 966 // cleanup and exit
971 free(option); 967 free(option);
@@ -1101,8 +1097,6 @@ void fs_chroot(const char *rootdir) {
1101 // firejail sandboxes (firejail --force) 1097 // firejail sandboxes (firejail --force)
1102 if (getuid() != 0) 1098 if (getuid() != 0)
1103 disable_firejail_config(); 1099 disable_firejail_config();
1104 else
1105 fprintf(stderr, "Warning: masking /etc/firejail disabled when starting the sandbox as root\n");
1106} 1100}
1107#endif 1101#endif
1108 1102
diff --git a/test/dist-compile/compile.sh b/test/dist-compile/compile.sh
index 64c99133a..2d055c1bd 100755
--- a/test/dist-compile/compile.sh
+++ b/test/dist-compile/compile.sh
@@ -9,7 +9,8 @@ arr[6]="TEST 6: compile network disabled"
9arr[7]="TEST 7: compile X11 disabled" 9arr[7]="TEST 7: compile X11 disabled"
10arr[8]="TEST 8: compile network restricted" 10arr[8]="TEST 8: compile network restricted"
11arr[9]="TEST 9: compile file transfer disabled" 11arr[9]="TEST 9: compile file transfer disabled"
12 12arr[10]="TEST 10: compile disable whitelist"
13arr[11]="TEST 11: compile disable global config"
13 14
14# remove previous reports and output file 15# remove previous reports and output file
15cleanup() { 16cleanup() {
@@ -213,7 +214,7 @@ print_title "${arr[9]}"
213# seccomp 214# seccomp
214cd firejail 215cd firejail
215make distclean 216make distclean
216./configure --prefix=/usr --enable-network=restricted --enable-fatal-warnings 2>&1 | tee ../output-configure 217./configure --prefix=/usr --disable-file-transfer --enable-fatal-warnings 2>&1 | tee ../output-configure
217make -j4 2>&1 | tee ../output-make 218make -j4 2>&1 | tee ../output-make
218cd .. 219cd ..
219grep Warning output-configure output-make > ./report-test9 220grep Warning output-configure output-make > ./report-test9
@@ -222,6 +223,44 @@ cp output-configure oc9
222cp output-make om9 223cp output-make om9
223rm output-configure output-make 224rm output-configure output-make
224 225
226#*****************************************************************
227# TEST 10
228#*****************************************************************
229# - disable whitelist
230# - check compilation
231#*****************************************************************
232print_title "${arr[10]}"
233# seccomp
234cd firejail
235make distclean
236./configure --prefix=/usr --disable-whitelist --enable-fatal-warnings 2>&1 | tee ../output-configure
237make -j4 2>&1 | tee ../output-make
238cd ..
239grep Warning output-configure output-make > ./report-test10
240grep Error output-configure output-make >> ./report-test10
241cp output-configure oc10
242cp output-make om10
243rm output-configure output-make
244
245#*****************************************************************
246# TEST 11
247#*****************************************************************
248# - disable global config
249# - check compilation
250#*****************************************************************
251print_title "${arr[11]}"
252# seccomp
253cd firejail
254make distclean
255./configure --prefix=/usr --disable-globalcfg --enable-fatal-warnings 2>&1 | tee ../output-configure
256make -j4 2>&1 | tee ../output-make
257cd ..
258grep Warning output-configure output-make > ./report-test11
259grep Error output-configure output-make >> ./report-test11
260cp output-configure oc11
261cp output-make om11
262rm output-configure output-make
263
225 264
226#***************************************************************** 265#*****************************************************************
227# PRINT REPORTS 266# PRINT REPORTS
@@ -246,3 +285,5 @@ echo ${arr[6]}
246echo ${arr[7]} 285echo ${arr[7]}
247echo ${arr[8]} 286echo ${arr[8]}
248echo ${arr[9]} 287echo ${arr[9]}
288echo ${arr[10]}
289echo ${arr[11]}