diff options
-rw-r--r-- | etc/transmission-qt.profile | 2 | ||||
-rwxr-xr-x | test/test-profile.exp | 20 | ||||
-rwxr-xr-x | test/test.sh | 8 |
3 files changed, 29 insertions, 1 deletions
diff --git a/etc/transmission-qt.profile b/etc/transmission-qt.profile index 226b4cf88..24f761f6f 100644 --- a/etc/transmission-qt.profile +++ b/etc/transmission-qt.profile | |||
@@ -8,7 +8,7 @@ blacklist ${HOME}/.lastpass | |||
8 | blacklist ${HOME}/.keepassx | 8 | blacklist ${HOME}/.keepassx |
9 | blacklist ${HOME}/.password-store | 9 | blacklist ${HOME}/.password-store |
10 | blacklist ${HOME}/.wine | 10 | blacklist ${HOME}/.wine |
11 | aps.drop all | 11 | caps.drop all |
12 | seccomp | 12 | seccomp |
13 | netfilter | 13 | netfilter |
14 | noroot | 14 | noroot |
diff --git a/test/test-profile.exp b/test/test-profile.exp new file mode 100755 index 000000000..89fe9c10a --- /dev/null +++ b/test/test-profile.exp | |||
@@ -0,0 +1,20 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | if { $argc != 1 } { | ||
8 | puts "TESTING ERROR: argument missing" | ||
9 | puts "Usage: test-profile.exp profile_name" | ||
10 | exit | ||
11 | } | ||
12 | |||
13 | send -- "firejail --profile=$argv\r" | ||
14 | expect { | ||
15 | timeout {puts "TESTING ERROR 0\n";exit} | ||
16 | "Child process initialized" | ||
17 | } | ||
18 | send -- "exit\r" | ||
19 | after 100 | ||
20 | puts "\n" | ||
diff --git a/test/test.sh b/test/test.sh index 61dd58f9e..6f198cd52 100755 --- a/test/test.sh +++ b/test/test.sh | |||
@@ -2,6 +2,14 @@ | |||
2 | 2 | ||
3 | ./chk_config.exp | 3 | ./chk_config.exp |
4 | 4 | ||
5 | echo "TESTING: default profiles installed in /etc" | ||
6 | PROFILES=`ls /etc/firejail/*.profile` | ||
7 | for PROFILE in $PROFILES | ||
8 | do | ||
9 | echo "TESTING: $PROFILE" | ||
10 | ./test-profile.exp $PROFILE | ||
11 | done | ||
12 | |||
5 | ./fscheck.sh | 13 | ./fscheck.sh |
6 | 14 | ||
7 | echo "TESTING: environment variables" | 15 | echo "TESTING: environment variables" |