diff options
author | 2023-02-28 09:51:26 -0500 | |
---|---|---|
committer | 2023-02-28 09:51:26 -0500 | |
commit | 27c4d069f322fbeca07c88e0e96208233103a5db (patch) | |
tree | fb4b4fdc75eb5e633ab55b8228a60f54176446a0 /test/features/3.3.exp | |
parent | fix cppcheck/scan-build problems (diff) | |
download | firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.gz firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.zst firejail-27c4d069f322fbeca07c88e0e96208233103a5db.zip |
chroot testing
Diffstat (limited to 'test/features/3.3.exp')
-rwxr-xr-x | test/features/3.3.exp | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/test/features/3.3.exp b/test/features/3.3.exp deleted file mode 100755 index 8c931dcf1..000000000 --- a/test/features/3.3.exp +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | # | ||
6 | # blacklist | ||
7 | # | ||
8 | |||
9 | set timeout 10 | ||
10 | spawn $env(SHELL) | ||
11 | match_max 100000 | ||
12 | set overlay [lindex $argv 0] | ||
13 | set chroot [lindex $argv 1] | ||
14 | |||
15 | # | ||
16 | # N | ||
17 | # | ||
18 | send -- "firejail --noprofile --blacklist=/home/netblue/.config\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 0\n";exit} | ||
21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | send -- "cd ~/.config\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 1\n";exit} | ||
28 | "Permission denied" | ||
29 | } | ||
30 | after 100 | ||
31 | send -- "exit\r" | ||
32 | sleep 1 | ||
33 | |||
34 | |||
35 | # | ||
36 | # O | ||
37 | # | ||
38 | if { $overlay == "overlay" } { | ||
39 | send -- "firejail --noprofile --overlay --blacklist=/home/netblue/.config\r" | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 2\n";exit} | ||
42 | "overlay option is not available" {puts "grsecurity\n"; exit} | ||
43 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} | ||
44 | } | ||
45 | sleep 1 | ||
46 | |||
47 | send -- "cd ~/.config\r" | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 3\n";exit} | ||
50 | "Permission denied" | ||
51 | } | ||
52 | after 100 | ||
53 | send -- "exit\r" | ||
54 | sleep 1 | ||
55 | } | ||
56 | |||
57 | # | ||
58 | # C | ||
59 | # | ||
60 | if { $chroot == "chroot" } { | ||
61 | send -- "firejail --noprofile --chroot=/tmp/chroot --blacklist=/home/netblue/.config\r" | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 4\n";exit} | ||
64 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
65 | } | ||
66 | sleep 1 | ||
67 | |||
68 | send -- "cd ~/.config\r" | ||
69 | expect { | ||
70 | timeout {puts "TESTING ERROR 5\n";exit} | ||
71 | "Permission denied" | ||
72 | } | ||
73 | after 100 | ||
74 | send -- "exit\r" | ||
75 | sleep 1 | ||
76 | } | ||
77 | |||
78 | puts "\nall done\n" | ||