aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-06-10 10:41:57 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-06-10 10:41:57 -0400
commite3abab47dcda4dba4a1412261e35cb1608ffd900 (patch)
treec1b75716185ea40aa77ff947991c868f7d5d8628
parentprivate-bin conversion (diff)
downloadfirejail-e3abab47dcda4dba4a1412261e35cb1608ffd900.tar.gz
firejail-e3abab47dcda4dba4a1412261e35cb1608ffd900.tar.zst
firejail-e3abab47dcda4dba4a1412261e35cb1608ffd900.zip
private-bin conversion
-rw-r--r--README.md4
-rw-r--r--etc/cherrytree.profile9
-rw-r--r--etc/disable-devel.inc2
-rw-r--r--etc/evince.profile3
-rw-r--r--etc/fbreader.profile3
-rw-r--r--etc/gnome-mplayer.profile3
-rw-r--r--etc/gthumb.profile2
-rw-r--r--etc/vlc.profile2
-rw-r--r--src/firejail/main.c1
-rwxr-xr-xtest/apps/apps.sh10
-rwxr-xr-xtest/apps/gthumb.exp83
11 files changed, 118 insertions, 4 deletions
diff --git a/README.md b/README.md
index 36fb99f3d..db0625d43 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,10 @@ BitTorrent profiles converted to private-bin: deluge, qbittorrent, rtorrent, tra
71 71
72File transfer: filezilla 72File transfer: filezilla
73 73
74Media: vlc, mpv, gnome-mplayer
75
76Office: evince, gthumb, fbreader
77
74## New security profiles 78## New security profiles
75 79
76Gitter, gThumb, mpv, Franz messenger 80Gitter, gThumb, mpv, Franz messenger
diff --git a/etc/cherrytree.profile b/etc/cherrytree.profile
index bc6fe1d86..7b6238d98 100644
--- a/etc/cherrytree.profile
+++ b/etc/cherrytree.profile
@@ -24,3 +24,12 @@ protocol unix,inet,inet6,netlink
24tracelog 24tracelog
25 25
26include /etc/firejail/whitelist-common.inc 26include /etc/firejail/whitelist-common.inc
27
28# no private-bin support for various reasons:
29#10:25:34 exec 11249 (root) NEW SANDBOX: /usr/bin/firejail /usr/bin/cherrytree
30#10:25:34 exec 11252 (netblue) /bin/bash -c "/usr/bin/cherrytree"
31#10:25:34 exec 11252 (netblue) /usr/bin/python /usr/bin/cherrytree
32#10:25:34 exec 11253 (netblue) sh -c /sbin/ldconfig -p 2>/dev/null
33#10:25:34 exec 11255 (netblue) sh -c if type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit 10; fi;LANG=C LC_ALL=C $CC -Wl,-t -o /tmp/tmpiYr44S 2>&1 -llibc
34# it requires acces to browser to show the online help
35# it doesn't play nicely with expect
diff --git a/etc/disable-devel.inc b/etc/disable-devel.inc
index 8c18ec2c3..071a82f76 100644
--- a/etc/disable-devel.inc
+++ b/etc/disable-devel.inc
@@ -37,7 +37,7 @@ blacklist /usr/lib/php*
37blacklist /usr/bin/ruby 37blacklist /usr/bin/ruby
38blacklist /usr/lib/ruby 38blacklist /usr/lib/ruby
39 39
40# Programs using python: deluge, some firefox addons, filezilla 40# Programs using python: deluge, firefox addons, filezilla, cherrytree
41# Python 2 41# Python 2
42#blacklist /usr/bin/python2* 42#blacklist /usr/bin/python2*
43#blacklist /usr/lib/python2* 43#blacklist /usr/lib/python2*
diff --git a/etc/evince.profile b/etc/evince.profile
index 8c84a1daa..8671c1251 100644
--- a/etc/evince.profile
+++ b/etc/evince.profile
@@ -10,3 +10,6 @@ noroot
10nosound 10nosound
11protocol unix,inet,inet6 11protocol unix,inet,inet6
12seccomp 12seccomp
13
14shell none
15private-bin evince,evince-previewer,evince-thumbnailer
diff --git a/etc/fbreader.profile b/etc/fbreader.profile
index c4d84691c..df359e50a 100644
--- a/etc/fbreader.profile
+++ b/etc/fbreader.profile
@@ -13,3 +13,6 @@ noroot
13nosound 13nosound
14protocol unix,inet,inet6 14protocol unix,inet,inet6
15seccomp 15seccomp
16
17shell none
18private-bin fbreader,FBReader \ No newline at end of file
diff --git a/etc/gnome-mplayer.profile b/etc/gnome-mplayer.profile
index f15778534..1caea177d 100644
--- a/etc/gnome-mplayer.profile
+++ b/etc/gnome-mplayer.profile
@@ -9,3 +9,6 @@ nonewprivs
9noroot 9noroot
10protocol unix,inet,inet6 10protocol unix,inet,inet6
11seccomp 11seccomp
12
13shell none
14private-bin gnome-mplayer
diff --git a/etc/gthumb.profile b/etc/gthumb.profile
index 55041b5cc..68d6a52d9 100644
--- a/etc/gthumb.profile
+++ b/etc/gthumb.profile
@@ -13,5 +13,5 @@ noroot
13protocol unix,inet,inet6 13protocol unix,inet,inet6
14seccomp 14seccomp
15 15
16private-bin gthumb
17shell none 16shell none
17private-bin gthumb
diff --git a/etc/vlc.profile b/etc/vlc.profile
index e225e80e9..1a6e5a151 100644
--- a/etc/vlc.profile
+++ b/etc/vlc.profile
@@ -16,4 +16,4 @@ seccomp
16 16
17# to test 17# to test
18shell none 18shell none
19private-bin vlc 19private-bin vlc,cvlc,nvlc,rvlc,qvlc,svlc
diff --git a/src/firejail/main.c b/src/firejail/main.c
index 1621d810f..d027eb697 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -135,7 +135,6 @@ static void myexit(int rv) {
135} 135}
136 136
137static void my_handler(int s){ 137static void my_handler(int s){
138printf("**************************\n");
139 EUID_ROOT(); 138 EUID_ROOT();
140 if (!arg_quiet) { 139 if (!arg_quiet) {
141 printf("\nParent received signal %d, shutting down the child process...\n", s); 140 printf("\nParent received signal %d, shutting down the child process...\n", s);
diff --git a/test/apps/apps.sh b/test/apps/apps.sh
index fa56ce370..bbfe2a606 100755
--- a/test/apps/apps.sh
+++ b/test/apps/apps.sh
@@ -87,6 +87,16 @@ else
87 echo "TESTING SKIP: evince not found" 87 echo "TESTING SKIP: evince not found"
88fi 88fi
89 89
90
91which gthumb
92if [ "$?" -eq 0 ];
93then
94 echo "TESTING: gthumb"
95 ./gthumb.exp
96else
97 echo "TESTING SKIP: gthumb not found"
98fi
99
90which icedove 100which icedove
91if [ "$?" -eq 0 ]; 101if [ "$?" -eq 0 ];
92then 102then
diff --git a/test/apps/gthumb.exp b/test/apps/gthumb.exp
new file mode 100755
index 000000000..86bb975ba
--- /dev/null
+++ b/test/apps/gthumb.exp
@@ -0,0 +1,83 @@
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 gthumb\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Reading profile /etc/firejail/gthumb.profile"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized"
18}
19sleep 3
20
21spawn $env(SHELL)
22send -- "firejail --list\r"
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 ":firejail"
26}
27expect {
28 timeout {puts "TESTING ERROR 3.1\n";exit}
29 "gthumb"
30}
31sleep 1
32
33# grsecurity exit
34send -- "file /proc/sys/kernel/grsecurity\r"
35expect {
36 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
37 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
38 "cannot open" {puts "grsecurity not present\n"}
39}
40
41send -- "firejail --name=blablabla\r"
42expect {
43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized"
45}
46sleep 2
47
48spawn $env(SHELL)
49send -- "firemon --seccomp\r"
50expect {
51 timeout {puts "TESTING ERROR 5\n";exit}
52 ":firejail gthumb"
53}
54expect {
55 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
56 "Seccomp: 2"
57}
58expect {
59 timeout {puts "TESTING ERROR 5.1\n";exit}
60 "name=blablabla"
61}
62sleep 1
63send -- "firemon --caps\r"
64expect {
65 timeout {puts "TESTING ERROR 6\n";exit}
66 ":firejail gthumb"
67}
68expect {
69 timeout {puts "TESTING ERROR 6.1\n";exit}
70 "CapBnd:"
71}
72expect {
73 timeout {puts "TESTING ERROR 6.2\n";exit}
74 "0000000000000000"
75}
76expect {
77 timeout {puts "TESTING ERROR 6.3\n";exit}
78 "name=blablabla"
79}
80sleep 1
81
82puts "\nall done\n"
83