diff options
author | 2018-04-29 10:51:32 -0400 | |
---|---|---|
committer | 2018-04-29 10:51:32 -0400 | |
commit | f0d1467e09e36ab5d0a9dd72ae80edd113456cc9 (patch) | |
tree | 74a8da4b49d20cd9cde2a379803f52cb562d30c1 /test/fs/invalid_filename.exp | |
parent | fix user database access (diff) | |
parent | testing (diff) | |
download | firejail-f0d1467e09e36ab5d0a9dd72ae80edd113456cc9.tar.gz firejail-f0d1467e09e36ab5d0a9dd72ae80edd113456cc9.tar.zst firejail-f0d1467e09e36ab5d0a9dd72ae80edd113456cc9.zip |
Merge branch 'master' of http://github.com/netblue30/firejail
Diffstat (limited to 'test/fs/invalid_filename.exp')
-rwxr-xr-x | test/fs/invalid_filename.exp | 79 |
1 files changed, 13 insertions, 66 deletions
diff --git a/test/fs/invalid_filename.exp b/test/fs/invalid_filename.exp index e16798ab8..84abe74cd 100755 --- a/test/fs/invalid_filename.exp +++ b/test/fs/invalid_filename.exp | |||
@@ -7,11 +7,7 @@ set timeout 10 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "firejail --debug-check-filename --noprofile --blacklist=\"bla&&bla\"\r" | 10 | send -- "firejail --noprofile --blacklist=\"bla&&bla\"\r" |
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
13 | "Checking filename bla&&bla" | ||
14 | } | ||
15 | expect { | 11 | expect { |
16 | timeout {puts "TESTING ERROR 1.2\n";exit} | 12 | timeout {puts "TESTING ERROR 1.2\n";exit} |
17 | "Error:" | 13 | "Error:" |
@@ -22,11 +18,7 @@ expect { | |||
22 | } | 18 | } |
23 | after 100 | 19 | after 100 |
24 | 20 | ||
25 | send -- "firejail --debug-check-filename --noprofile --cgroup=\"bla&&bla\"\r" | 21 | send -- "firejail --noprofile --cgroup=\"bla&&bla\"\r" |
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 2.1\n";exit} | ||
28 | "Checking filename bla&&bla" | ||
29 | } | ||
30 | expect { | 22 | expect { |
31 | timeout {puts "TESTING ERROR 2.2\n";exit} | 23 | timeout {puts "TESTING ERROR 2.2\n";exit} |
32 | "Error:" | 24 | "Error:" |
@@ -37,12 +29,7 @@ expect { | |||
37 | } | 29 | } |
38 | after 100 | 30 | after 100 |
39 | 31 | ||
40 | send -- "firejail --debug-check-filename --noprofile --chroot=\"bla&&bla\"\r" | 32 | send -- "firejail --noprofile --chroot=\"bla&&bla\"\r" |
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
43 | "Checking filename bla&&bla" {puts "normal system\n"} | ||
44 | "Error: --chroot option is not available on Grsecurity systems" { puts "\nall done\n"; exit} | ||
45 | } | ||
46 | expect { | 33 | expect { |
47 | timeout {puts "TESTING ERROR 3.2\n";exit} | 34 | timeout {puts "TESTING ERROR 3.2\n";exit} |
48 | "Error:" | 35 | "Error:" |
@@ -53,11 +40,7 @@ expect { | |||
53 | } | 40 | } |
54 | after 100 | 41 | after 100 |
55 | 42 | ||
56 | send -- "firejail --debug-check-filename --noprofile --netfilter=\"bla&&bla\"\r" | 43 | send -- "firejail --noprofile --netfilter=\"bla&&bla\"\r" |
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 4.1\n";exit} | ||
59 | "Checking filename bla&&bla" | ||
60 | } | ||
61 | expect { | 44 | expect { |
62 | timeout {puts "TESTING ERROR 4.2\n";exit} | 45 | timeout {puts "TESTING ERROR 4.2\n";exit} |
63 | "Error:" | 46 | "Error:" |
@@ -68,22 +51,14 @@ expect { | |||
68 | } | 51 | } |
69 | after 100 | 52 | after 100 |
70 | 53 | ||
71 | send -- "firejail --debug-check-filename --noprofile --output=\"bla&&bla\"\r" | 54 | send -- "firejail --noprofile --output=\"bla&&bla\"\r" |
72 | expect { | ||
73 | timeout {puts "TESTING ERROR 5.2\n";exit} | ||
74 | "Error:" | ||
75 | } | ||
76 | expect { | 55 | expect { |
77 | timeout {puts "TESTING ERROR 5.3\n";exit} | 56 | timeout {puts "TESTING ERROR 5.3\n";exit} |
78 | "is an invalid filename" | 57 | "is an invalid filename" |
79 | } | 58 | } |
80 | after 100 | 59 | after 100 |
81 | 60 | ||
82 | send -- "firejail --debug-check-filename --noprofile --private=\"bla&&bla\"\r" | 61 | send -- "firejail --noprofile --private=\"bla&&bla\"\r" |
83 | expect { | ||
84 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
85 | "Checking filename bla&&bla" | ||
86 | } | ||
87 | expect { | 62 | expect { |
88 | timeout {puts "TESTING ERROR 6.2\n";exit} | 63 | timeout {puts "TESTING ERROR 6.2\n";exit} |
89 | "Error:" | 64 | "Error:" |
@@ -94,11 +69,7 @@ expect { | |||
94 | } | 69 | } |
95 | after 100 | 70 | after 100 |
96 | 71 | ||
97 | send -- "firejail --debug-check-filename --noprofile --private-bin=\"bla&&bla\"\r" | 72 | send -- "firejail --noprofile --private-bin=\"bla&&bla\"\r" |
98 | expect { | ||
99 | timeout {puts "TESTING ERROR 7.1\n";exit} | ||
100 | "Checking filename bla&&bla" | ||
101 | } | ||
102 | expect { | 73 | expect { |
103 | timeout {puts "TESTING ERROR 7.2\n";exit} | 74 | timeout {puts "TESTING ERROR 7.2\n";exit} |
104 | "Error:" | 75 | "Error:" |
@@ -109,11 +80,7 @@ expect { | |||
109 | } | 80 | } |
110 | after 100 | 81 | after 100 |
111 | 82 | ||
112 | send -- "firejail --debug-check-filename --noprofile --private-home=\"bla&&bla\"\r" | 83 | send -- "firejail --noprofile --private-home=\"bla&&bla\"\r" |
113 | expect { | ||
114 | timeout {puts "TESTING ERROR 8.1\n";exit} | ||
115 | "Checking filename bla&&bla" | ||
116 | } | ||
117 | expect { | 84 | expect { |
118 | timeout {puts "TESTING ERROR 8.2\n";exit} | 85 | timeout {puts "TESTING ERROR 8.2\n";exit} |
119 | "Error:" | 86 | "Error:" |
@@ -124,11 +91,7 @@ expect { | |||
124 | } | 91 | } |
125 | after 100 | 92 | after 100 |
126 | 93 | ||
127 | send -- "firejail --debug-check-filename --noprofile --private-etc=\"bla&&bla\"\r" | 94 | send -- "firejail --noprofile --private-etc=\"bla&&bla\"\r" |
128 | expect { | ||
129 | timeout {puts "TESTING ERROR 9.1\n";exit} | ||
130 | "Checking filename bla&&bla" | ||
131 | } | ||
132 | expect { | 95 | expect { |
133 | timeout {puts "TESTING ERROR 9.2\n";exit} | 96 | timeout {puts "TESTING ERROR 9.2\n";exit} |
134 | "Error:" | 97 | "Error:" |
@@ -139,11 +102,7 @@ expect { | |||
139 | } | 102 | } |
140 | after 100 | 103 | after 100 |
141 | 104 | ||
142 | send -- "firejail --debug-check-filename --profile=\"bla&&bla\"\r" | 105 | send -- "firejail --profile=\"bla&&bla\"\r" |
143 | expect { | ||
144 | timeout {puts "TESTING ERROR 10.1\n";exit} | ||
145 | "Checking filename bla&&bla" | ||
146 | } | ||
147 | expect { | 106 | expect { |
148 | timeout {puts "TESTING ERROR 10.2\n";exit} | 107 | timeout {puts "TESTING ERROR 10.2\n";exit} |
149 | "Error:" | 108 | "Error:" |
@@ -154,11 +113,7 @@ expect { | |||
154 | } | 113 | } |
155 | after 100 | 114 | after 100 |
156 | 115 | ||
157 | send -- "firejail --debug-check-filename --read-only=\"bla&&bla\"\r" | 116 | send -- "firejail --read-only=\"bla&&bla\"\r" |
158 | expect { | ||
159 | timeout {puts "TESTING ERROR 11.1\n";exit} | ||
160 | "Checking filename bla&&bla" | ||
161 | } | ||
162 | expect { | 117 | expect { |
163 | timeout {puts "TESTING ERROR 11.2\n";exit} | 118 | timeout {puts "TESTING ERROR 11.2\n";exit} |
164 | "Error:" | 119 | "Error:" |
@@ -169,11 +124,7 @@ expect { | |||
169 | } | 124 | } |
170 | after 100 | 125 | after 100 |
171 | 126 | ||
172 | send -- "firejail --debug-check-filename --shell=\"bla&&bla\"\r" | 127 | send -- "firejail --shell=\"bla&&bla\"\r" |
173 | expect { | ||
174 | timeout {puts "TESTING ERROR 12.1\n";exit} | ||
175 | "Checking filename bla&&bla" | ||
176 | } | ||
177 | expect { | 128 | expect { |
178 | timeout {puts "TESTING ERROR 12.2\n";exit} | 129 | timeout {puts "TESTING ERROR 12.2\n";exit} |
179 | "Error:" | 130 | "Error:" |
@@ -185,11 +136,7 @@ expect { | |||
185 | after 100 | 136 | after 100 |
186 | 137 | ||
187 | 138 | ||
188 | send -- "firejail --debug-check-filename --whitelist=\"bla&&bla\"\r" | 139 | send -- "firejail --whitelist=\"bla&&bla\"\r" |
189 | expect { | ||
190 | timeout {puts "TESTING ERROR 14.1\n";exit} | ||
191 | "Checking filename bla&&bla" | ||
192 | } | ||
193 | expect { | 140 | expect { |
194 | timeout {puts "TESTING ERROR 14.2\n";exit} | 141 | timeout {puts "TESTING ERROR 14.2\n";exit} |
195 | "Error:" | 142 | "Error:" |