diff options
author | netblue30 <netblue30@yahoo.com> | 2018-08-11 08:53:05 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2018-08-11 08:53:05 -0400 |
commit | a535609f5b6f4f6357219630f2da485d4aefb9d9 (patch) | |
tree | d4b1e9d2c6f6eb8799bd9346316b149646c512cc /test | |
parent | xdg macro: silence resolve messages unless arg_debug (diff) | |
download | firejail-a535609f5b6f4f6357219630f2da485d4aefb9d9.tar.gz firejail-a535609f5b6f4f6357219630f2da485d4aefb9d9.tar.zst firejail-a535609f5b6f4f6357219630f2da485d4aefb9d9.zip |
release 0.9.56~rc1 testing
Diffstat (limited to 'test')
-rwxr-xr-x | test/blacklist-link.exp | 82 | ||||
-rwxr-xr-x | test/blacklist.exp | 75 | ||||
-rw-r--r-- | test/blacklist1.profile | 1 | ||||
-rw-r--r-- | test/blacklist2.profile | 1 | ||||
-rw-r--r-- | test/blacklist3.profile | 1 |
5 files changed, 0 insertions, 160 deletions
diff --git a/test/blacklist-link.exp b/test/blacklist-link.exp deleted file mode 100755 index 4252f875a..000000000 --- a/test/blacklist-link.exp +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # blacklist a directory symlink | ||
8 | send -- "firejail --blacklist=auto2\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 1\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | sleep 1 | ||
14 | |||
15 | send -- "ls auto2\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 2\n";exit} | ||
18 | "cannot open directory" | ||
19 | } | ||
20 | send -- "exit\r" | ||
21 | sleep 1 | ||
22 | |||
23 | # blacklist a directory symlink from a profile file | ||
24 | send -- "firejail --profile=blacklist3.profile\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 3\n";exit} | ||
27 | "Child process initialized" | ||
28 | } | ||
29 | sleep 1 | ||
30 | |||
31 | send -- "ls auto2\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 4\n";exit} | ||
34 | "cannot open directory" | ||
35 | } | ||
36 | send -- "exit\r" | ||
37 | sleep 1 | ||
38 | |||
39 | # do not blacklist /bin | ||
40 | send -- "firejail --blacklist=auto3\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 5\n";exit} | ||
43 | "auto3 directory link was not blacklisted" | ||
44 | } | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
47 | "Child process initialized" | ||
48 | } | ||
49 | sleep 1 | ||
50 | |||
51 | send -- "ls auto3; pwd\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 6\n";exit} | ||
54 | "cannot open directory" {puts "TESTING ERROR 6.1\n";exit} | ||
55 | "home" | ||
56 | } | ||
57 | send -- "exit\r" | ||
58 | sleep 1 | ||
59 | |||
60 | # do not blacklist /usr/bin | ||
61 | send -- "firejail --blacklist=auto3\r" | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 7\n";exit} | ||
64 | "auto3 directory link was not blacklisted" | ||
65 | } | ||
66 | expect { | ||
67 | timeout {puts "TESTING ERROR 7.1\n";exit} | ||
68 | "Child process initialized" | ||
69 | } | ||
70 | sleep 1 | ||
71 | |||
72 | send -- "ls auto3; pwd\r" | ||
73 | expect { | ||
74 | timeout {puts "TESTING ERROR 8\n";exit} | ||
75 | "cannot open directory" {puts "TESTING ERROR 9.1\n";exit} | ||
76 | "home" | ||
77 | } | ||
78 | send -- "exit\r" | ||
79 | sleep 1 | ||
80 | |||
81 | |||
82 | puts "all done\n" | ||
diff --git a/test/blacklist.exp b/test/blacklist.exp deleted file mode 100755 index 9c3dddf1f..000000000 --- a/test/blacklist.exp +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # directory with ~ | ||
8 | send -- "firejail --blacklist=~/.config\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 1\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | sleep 1 | ||
14 | |||
15 | send -- "ls -al ~/.config\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 2\n";exit} | ||
18 | "cannot open directory" | ||
19 | } | ||
20 | |||
21 | send -- "exit\r" | ||
22 | sleep 1 | ||
23 | |||
24 | # directory with ~ in profile file | ||
25 | send -- "firejail --profile=blacklist1.profile\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 3\n";exit} | ||
28 | "Child process initialized" | ||
29 | } | ||
30 | sleep 1 | ||
31 | |||
32 | send -- "ls -al ~/.config\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 4\n";exit} | ||
35 | "cannot open directory" | ||
36 | } | ||
37 | |||
38 | send -- "exit\r" | ||
39 | sleep 1 | ||
40 | |||
41 | |||
42 | # directory with space | ||
43 | send -- "firejail \"--blacklist=dir with space\"\r" | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 5\n";exit} | ||
46 | "Child process initialized" | ||
47 | } | ||
48 | sleep 1 | ||
49 | |||
50 | send -- "ls -al \"dir with space\"\r" | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 6\n";exit} | ||
53 | "cannot open directory" | ||
54 | } | ||
55 | |||
56 | send -- "exit\r" | ||
57 | sleep 1 | ||
58 | |||
59 | # directory with space in profile | ||
60 | send -- "firejail --profile=blacklist2.profile\r" | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 7\n";exit} | ||
63 | "Child process initialized" | ||
64 | } | ||
65 | sleep 1 | ||
66 | |||
67 | send -- "ls -al \"dir with space\"\r" | ||
68 | expect { | ||
69 | timeout {puts "TESTING ERROR 8\n";exit} | ||
70 | "cannot open directory" | ||
71 | } | ||
72 | |||
73 | |||
74 | |||
75 | puts "\n" | ||
diff --git a/test/blacklist1.profile b/test/blacklist1.profile deleted file mode 100644 index f12facd05..000000000 --- a/test/blacklist1.profile +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | blacklist ~/.config | ||
diff --git a/test/blacklist2.profile b/test/blacklist2.profile deleted file mode 100644 index 4bb603db2..000000000 --- a/test/blacklist2.profile +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | blacklist dir with space | ||
diff --git a/test/blacklist3.profile b/test/blacklist3.profile deleted file mode 100644 index 08f754f3f..000000000 --- a/test/blacklist3.profile +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | blacklist auto2 | ||