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/1.10.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/1.10.exp')
-rwxr-xr-x | test/features/1.10.exp | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/test/features/1.10.exp b/test/features/1.10.exp deleted file mode 100755 index 6744ce826..000000000 --- a/test/features/1.10.exp +++ /dev/null | |||
@@ -1,82 +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 | # disable /selinux | ||
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\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 -- "ls -l /selinux\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 1\n";exit} | ||
28 | "Permission denied" {puts "denied\n"} | ||
29 | "No such file or directory" {puts "no file\n"} | ||
30 | } | ||
31 | after 100 | ||
32 | send -- "exit\r" | ||
33 | sleep 1 | ||
34 | |||
35 | |||
36 | # | ||
37 | # O | ||
38 | # | ||
39 | if { $overlay == "overlay" } { | ||
40 | send -- "firejail --noprofile --overlay\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 2\n";exit} | ||
43 | "overlay option is not available" {puts "grsecurity\n"; exit} | ||
44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} | ||
45 | } | ||
46 | sleep 1 | ||
47 | |||
48 | send -- "ls -l /selinux\r" | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 3\n";exit} | ||
51 | "Permission denied" {puts "denied\n"} | ||
52 | "No such file or directory" {puts "no file\n"} | ||
53 | } | ||
54 | after 100 | ||
55 | send -- "exit\r" | ||
56 | sleep 1 | ||
57 | } | ||
58 | |||
59 | # | ||
60 | # C | ||
61 | # | ||
62 | if { $chroot == "chroot" } { | ||
63 | send -- "firejail --noprofile --chroot=/tmp/chroot\r" | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 4\n";exit} | ||
66 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
67 | } | ||
68 | sleep 1 | ||
69 | |||
70 | send -- "ls -l /selinux\r" | ||
71 | expect { | ||
72 | timeout {puts "TESTING ERROR 5\n";exit} | ||
73 | "Permission denied" {puts "denied\n"} | ||
74 | "No such file or directory" {puts "no file\n"} | ||
75 | } | ||
76 | after 100 | ||
77 | send -- "exit\r" | ||
78 | sleep 1 | ||
79 | } | ||
80 | |||
81 | |||
82 | puts "\nall done\n" | ||