aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-06-10 08:40:24 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-06-10 08:40:24 -0400
commit783251e0749e27e28b3ac54b5047f10cf1c44016 (patch)
tree7fddeee60485e3183ed2d7590efad8e32ed27b53
parentx11 work (diff)
downloadfirejail-783251e0749e27e28b3ac54b5047f10cf1c44016.tar.gz
firejail-783251e0749e27e28b3ac54b5047f10cf1c44016.tar.zst
firejail-783251e0749e27e28b3ac54b5047f10cf1c44016.zip
private-bin conversion
-rw-r--r--README.md4
-rw-r--r--etc/deluge.profile5
-rw-r--r--etc/disable-devel.inc3
-rw-r--r--etc/mpv.profile4
-rw-r--r--etc/qbittorrent.profile3
-rw-r--r--etc/rtorrent.profile3
-rw-r--r--etc/transmission-gtk.profile5
-rw-r--r--etc/transmission-qt.profile5
-rw-r--r--etc/vlc.profile5
-rw-r--r--src/man/firejail.txt2
-rwxr-xr-xtest/apps/apps.sh9
-rwxr-xr-xtest/apps/qbittorrent.exp83
12 files changed, 125 insertions, 6 deletions
diff --git a/README.md b/README.md
index bc5717fb7..029a7c904 100644
--- a/README.md
+++ b/README.md
@@ -65,6 +65,10 @@ More packages build by AppImage developer Simon Peter: https://bintray.com/probo
65 65
66AppImage project home: https://github.com/probonopd/AppImageKit 66AppImage project home: https://github.com/probonopd/AppImageKit
67 67
68## Converting profiles to private-bin - work in progress
69
70BitTorrent profiles converted to private-bin: deluge, qbittorrent, rtorrent, transmission-gtk, transmission-qt
71
68## New security profiles 72## New security profiles
69 73
70Gitter, gThumb, mpv, Franz messenger 74Gitter, gThumb, mpv, Franz messenger
diff --git a/etc/deluge.profile b/etc/deluge.profile
index 277ecc15e..87a17423b 100644
--- a/etc/deluge.profile
+++ b/etc/deluge.profile
@@ -1,4 +1,4 @@
1# deluge bittorernt client profile 1# deluge bittorrernt client profile
2include /etc/firejail/disable-common.inc 2include /etc/firejail/disable-common.inc
3include /etc/firejail/disable-programs.inc 3include /etc/firejail/disable-programs.inc
4# deluge is using python on Debian 4# deluge is using python on Debian
@@ -12,3 +12,6 @@ noroot
12nosound 12nosound
13protocol unix,inet,inet6 13protocol unix,inet,inet6
14seccomp 14seccomp
15
16shell none
17private-bin deluge,sh,python,uname
diff --git a/etc/disable-devel.inc b/etc/disable-devel.inc
index 0c9d21d39..99f059c44 100644
--- a/etc/disable-devel.inc
+++ b/etc/disable-devel.inc
@@ -37,8 +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# disabled temporarily pending globbing implementation 40# Programs using python: deluge, some firefox addons
41# in noblacklist command and firefox profile fix
42# Python 2 41# Python 2
43#blacklist /usr/bin/python2* 42#blacklist /usr/bin/python2*
44#blacklist /usr/lib/python2* 43#blacklist /usr/lib/python2*
diff --git a/etc/mpv.profile b/etc/mpv.profile
index 0a8a6103f..cbed7e8c6 100644
--- a/etc/mpv.profile
+++ b/etc/mpv.profile
@@ -12,3 +12,7 @@ nonewprivs
12noroot 12noroot
13protocol unix,inet,inet6 13protocol unix,inet,inet6
14seccomp 14seccomp
15
16# to test
17shell none
18private-bin mpv
diff --git a/etc/qbittorrent.profile b/etc/qbittorrent.profile
index cbf898502..bb97a880b 100644
--- a/etc/qbittorrent.profile
+++ b/etc/qbittorrent.profile
@@ -11,3 +11,6 @@ noroot
11nosound 11nosound
12protocol unix,inet,inet6 12protocol unix,inet,inet6
13seccomp 13seccomp
14
15shell none
16private-bin qbittorrent
diff --git a/etc/rtorrent.profile b/etc/rtorrent.profile
index 0be5e15d1..c196370a2 100644
--- a/etc/rtorrent.profile
+++ b/etc/rtorrent.profile
@@ -11,3 +11,6 @@ noroot
11nosound 11nosound
12protocol unix,inet,inet6 12protocol unix,inet,inet6
13seccomp 13seccomp
14
15shell none
16private-bin rtorrent
diff --git a/etc/transmission-gtk.profile b/etc/transmission-gtk.profile
index 5aef32d45..e8d0e25e7 100644
--- a/etc/transmission-gtk.profile
+++ b/etc/transmission-gtk.profile
@@ -1,4 +1,4 @@
1# transmission-gtk profile 1# transmission-gtk bittorrent profile
2noblacklist ${HOME}/.config/transmission 2noblacklist ${HOME}/.config/transmission
3noblacklist ${HOME}/.cache/transmission 3noblacklist ${HOME}/.cache/transmission
4 4
@@ -15,3 +15,6 @@ nosound
15protocol unix,inet,inet6 15protocol unix,inet,inet6
16seccomp 16seccomp
17tracelog 17tracelog
18
19shell none
20private-bin transmission-gtk
diff --git a/etc/transmission-qt.profile b/etc/transmission-qt.profile
index d8ab1c60d..fd3a98aad 100644
--- a/etc/transmission-qt.profile
+++ b/etc/transmission-qt.profile
@@ -1,4 +1,4 @@
1# transmission-qt profile 1# transmission-qt bittorrent profile
2noblacklist ${HOME}/.config/transmission 2noblacklist ${HOME}/.config/transmission
3noblacklist ${HOME}/.cache/transmission 3noblacklist ${HOME}/.cache/transmission
4 4
@@ -15,3 +15,6 @@ nosound
15protocol unix,inet,inet6 15protocol unix,inet,inet6
16seccomp 16seccomp
17tracelog 17tracelog
18
19shell none
20private-bin transmission-qt
diff --git a/etc/vlc.profile b/etc/vlc.profile
index f8eebd376..e225e80e9 100644
--- a/etc/vlc.profile
+++ b/etc/vlc.profile
@@ -12,3 +12,8 @@ nonewprivs
12noroot 12noroot
13protocol unix,inet,inet6 13protocol unix,inet,inet6
14seccomp 14seccomp
15
16
17# to test
18shell none
19private-bin vlc
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index 71a73a02d..d72deab2f 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -1206,7 +1206,7 @@ sysfs,_sysctl, adjtimex, clock_adjtime, lookup_dcookie, perf_event_open, fanotif
1206add_key, request_key, keyctl, uselib, acct, modify_ldt, pivot_root, io_setup, 1206add_key, request_key, keyctl, uselib, acct, modify_ldt, pivot_root, io_setup,
1207io_destroy, io_getevents, io_submit, io_cancel, 1207io_destroy, io_getevents, io_submit, io_cancel,
1208remap_file_pages, mbind, get_mempolicy, set_mempolicy, 1208remap_file_pages, mbind, get_mempolicy, set_mempolicy,
1209migrate_pages, move_pages, vmsplice, perf_event_open, chroot, 1209migrate_pages, move_pages, vmsplice, chroot,
1210tuxcall, reboot, mfsservctl and get_kernel_syms. 1210tuxcall, reboot, mfsservctl and get_kernel_syms.
1211.br 1211.br
1212 1212
diff --git a/test/apps/apps.sh b/test/apps/apps.sh
index 37d66d609..3ecc161a1 100755
--- a/test/apps/apps.sh
+++ b/test/apps/apps.sh
@@ -60,6 +60,15 @@ else
60 echo "TESTING SKIP: transmission-qt not found" 60 echo "TESTING SKIP: transmission-qt not found"
61fi 61fi
62 62
63which qbittorrent
64if [ "$?" -eq 0 ];
65then
66 echo "TESTING: qbittorrent"
67 ./qbittorrent.exp
68else
69 echo "TESTING SKIP: qbittorrent not found"
70fi
71
63which evince 72which evince
64if [ "$?" -eq 0 ]; 73if [ "$?" -eq 0 ];
65then 74then
diff --git a/test/apps/qbittorrent.exp b/test/apps/qbittorrent.exp
new file mode 100755
index 000000000..4f3f7c362
--- /dev/null
+++ b/test/apps/qbittorrent.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 qbittorrent\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Reading profile /etc/firejail/qbittorrent.profile"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized"
18}
19sleep 5
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 "qbittorrent"
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 qbittorrent"
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 qbittorrent"
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 "\n"
83