diff options
author | curiosity-seeker <seeker@posteo.org> | 2016-12-15 12:58:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-15 12:58:32 +0100 |
commit | d8ee390a6ca56fde4baad57dea7572c39d595809 (patch) | |
tree | 255252b15232086e6f65203cda676859ab4117a0 /test/apps/firefox.exp | |
parent | Update quiterss.profile (diff) | |
parent | added a 1 second delay after xpra server is started (diff) | |
download | firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.gz firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.zst firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.zip |
Merge pull request #1 from netblue30/master
Bring fork up-to-date
Diffstat (limited to 'test/apps/firefox.exp')
-rwxr-xr-x | test/apps/firefox.exp | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/test/apps/firefox.exp b/test/apps/firefox.exp new file mode 100755 index 000000000..5745d9270 --- /dev/null +++ b/test/apps/firefox.exp | |||
@@ -0,0 +1,100 @@ | |||
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail firefox -no-remote www.gentoo.org\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Reading profile /etc/firejail/firefox.profile" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "Child process initialized" | ||
18 | } | ||
19 | sleep 10 | ||
20 | |||
21 | spawn $env(SHELL) | ||
22 | send -- "firejail --list\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 3\n";exit} | ||
25 | ":firejail" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
29 | "firefox" {puts "firefox detected\n";} | ||
30 | "iceweasel" {puts "iceweasel detected\n";} | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
34 | "no-remote" | ||
35 | } | ||
36 | after 100 | ||
37 | |||
38 | # grsecurity exit | ||
39 | send -- "file /proc/sys/kernel/grsecurity\r" | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR - grsecurity detection\n";exit} | ||
42 | "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} | ||
43 | "cannot open" {puts "grsecurity not present\n"} | ||
44 | } | ||
45 | |||
46 | |||
47 | send -- "firejail --name=blablabla\r" | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 4\n";exit} | ||
50 | "Child process initialized" | ||
51 | } | ||
52 | sleep 2 | ||
53 | |||
54 | spawn $env(SHELL) | ||
55 | send -- "firemon --seccomp\r" | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 5\n";exit} | ||
58 | "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} | ||
59 | " firefox" {puts "firefox detected\n";} | ||
60 | " iceweasel" {puts "iceweasel detected\n";} | ||
61 | } | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 5.0\n";exit} | ||
64 | "no-remote" | ||
65 | } | ||
66 | expect { | ||
67 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | ||
68 | "Seccomp: 2" | ||
69 | } | ||
70 | expect { | ||
71 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
72 | "name=blablabla" | ||
73 | } | ||
74 | after 100 | ||
75 | send -- "firemon --caps\r" | ||
76 | expect { | ||
77 | timeout {puts "TESTING ERROR 6\n";exit} | ||
78 | " firefox" {puts "firefox detected\n";} | ||
79 | " iceweasel" {puts "iceweasel detected\n";} | ||
80 | } | ||
81 | expect { | ||
82 | timeout {puts "TESTING ERROR 6.0\n";exit} | ||
83 | "no-remote" | ||
84 | } | ||
85 | expect { | ||
86 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
87 | "CapBnd:" | ||
88 | } | ||
89 | expect { | ||
90 | timeout {puts "TESTING ERROR 6.2\n";exit} | ||
91 | "0000000000000000" | ||
92 | } | ||
93 | expect { | ||
94 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
95 | "name=blablabla" | ||
96 | } | ||
97 | after 100 | ||
98 | |||
99 | puts "\n" | ||
100 | |||