diff options
Diffstat (limited to 'test/private-lib/gnome-calculator.exp')
-rwxr-xr-x | test/private-lib/gnome-calculator.exp | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/test/private-lib/gnome-calculator.exp b/test/private-lib/gnome-calculator.exp deleted file mode 100755 index e9d2c8208..000000000 --- a/test/private-lib/gnome-calculator.exp +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2018 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # gnome-calculator uses quiet at the top of the profile | ||
11 | # we need to use --ignore | ||
12 | send -- "firejail --ignore=quiet gnome-calculator\r" | ||
13 | expect { | ||
14 | timeout {puts "TESTING ERROR 0\n";exit} | ||
15 | "Reading profile /etc/firejail/gnome-calculator.profile" | ||
16 | } | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 1\n";exit} | ||
19 | "Child process initialized" | ||
20 | } | ||
21 | sleep 3 | ||
22 | |||
23 | spawn $env(SHELL) | ||
24 | send -- "firejail --list\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 3\n";exit} | ||
27 | ":firejail" | ||
28 | } | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
31 | "gnome-calculator" | ||
32 | } | ||
33 | after 100 | ||
34 | |||
35 | # grsecurity exit | ||
36 | send -- "file /proc/sys/kernel/grsecurity\r" | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR - grsecurity detection\n";exit} | ||
39 | "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} | ||
40 | "cannot open" {puts "grsecurity not present\n"} | ||
41 | } | ||
42 | |||
43 | send -- "firejail --name=blablabla\r" | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 4\n";exit} | ||
46 | "Child process initialized" | ||
47 | } | ||
48 | sleep 2 | ||
49 | |||
50 | spawn $env(SHELL) | ||
51 | send -- "firemon --seccomp\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 5\n";exit} | ||
54 | "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} | ||
55 | ":firejail --ignore=quiet gnome-calculator" | ||
56 | } | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | ||
59 | "Seccomp: 2" | ||
60 | } | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
63 | "name=blablabla" | ||
64 | } | ||
65 | after 100 | ||
66 | send -- "firemon --caps\r" | ||
67 | expect { | ||
68 | timeout {puts "TESTING ERROR 6\n";exit} | ||
69 | ":firejail --ignore=quiet gnome-calculator" | ||
70 | } | ||
71 | expect { | ||
72 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
73 | "CapBnd:" | ||
74 | } | ||
75 | expect { | ||
76 | timeout {puts "TESTING ERROR 6.2\n";exit} | ||
77 | "0000000000000000" | ||
78 | } | ||
79 | expect { | ||
80 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
81 | "name=blablabla" | ||
82 | } | ||
83 | after 100 | ||
84 | |||
85 | puts "\nall done\n" | ||