diff options
Diffstat (limited to 'test/fs_chroot_asroot.exp')
-rwxr-xr-x | test/fs_chroot_asroot.exp | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/test/fs_chroot_asroot.exp b/test/fs_chroot_asroot.exp deleted file mode 100755 index 000ce96f7..000000000 --- a/test/fs_chroot_asroot.exp +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --chroot=/tmp/chroot\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | send -- "cd /home;pwd\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 0.1\n";exit} | ||
17 | "home" | ||
18 | } | ||
19 | sleep 1 | ||
20 | send -- "bash\r" | ||
21 | sleep 1 | ||
22 | send -- "ls /; pwd\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 0.2\n";exit} | ||
25 | "this-is-my-chroot" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 0.3\n";exit} | ||
29 | "home" | ||
30 | } | ||
31 | |||
32 | send -- "umount /boot; pwd\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 0.4\n";exit} | ||
35 | "Bad system call" | ||
36 | } | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 0.5\n";exit} | ||
39 | "home" | ||
40 | } | ||
41 | |||
42 | send -- "/unchroot; pwd\r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 0.6\n";exit} | ||
45 | "Bad system call" | ||
46 | } | ||
47 | expect { | ||
48 | timeout {puts "TESTING ERROR 0.7\n";exit} | ||
49 | "home" | ||
50 | } | ||
51 | |||
52 | |||
53 | |||
54 | |||
55 | |||
56 | send -- "ps aux; pwd\r" | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 1\n";exit} | ||
59 | "/bin/bash" | ||
60 | } | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 2\n";exit} | ||
63 | "bash" | ||
64 | } | ||
65 | expect { | ||
66 | timeout {puts "TESTING ERROR 3\n";exit} | ||
67 | "ps aux" | ||
68 | } | ||
69 | expect { | ||
70 | timeout {puts "TESTING ERROR 4\n";exit} | ||
71 | "home" | ||
72 | } | ||
73 | sleep 1 | ||
74 | |||
75 | |||
76 | send -- "ps aux |wc -l; pwd\r" | ||
77 | expect { | ||
78 | timeout {puts "TESTING ERROR 5\n";exit} | ||
79 | "6" | ||
80 | } | ||
81 | expect { | ||
82 | timeout {puts "TESTING ERROR 6\n";exit} | ||
83 | "home" | ||
84 | } | ||
85 | sleep 1 | ||
86 | |||
87 | |||
88 | |||
89 | |||
90 | puts "all done\n" | ||