diff options
author | netblue30 <netblue30@yahoo.com> | 2016-05-05 10:22:18 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-05-05 10:22:18 -0400 |
commit | 37a5a3545ef6d8d03dad8bbd888f53e13274c9e5 (patch) | |
tree | 5d56a4b0a0933963d97eb0a88dd00fec9ea58bf2 /test/invalid_filename.exp | |
parent | rename generic.profile as default.profile (diff) | |
download | firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.tar.gz firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.tar.zst firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.zip |
testing
Diffstat (limited to 'test/invalid_filename.exp')
-rwxr-xr-x | test/invalid_filename.exp | 207 |
1 files changed, 0 insertions, 207 deletions
diff --git a/test/invalid_filename.exp b/test/invalid_filename.exp deleted file mode 100755 index fe8bd8c25..000000000 --- a/test/invalid_filename.exp +++ /dev/null | |||
@@ -1,207 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | #invalid_filename checks: | ||
4 | # | ||
5 | #--bind (two files) - profile.c - Note: The test is not implemented here, need to be root to test it | ||
6 | #--blacklist - profile.c | ||
7 | #--cgroup - cgroup.c | ||
8 | #--chroot - main.c | ||
9 | #--netfilter - netfilter.c | ||
10 | #--output - output.c | ||
11 | #--private - fs_home.c | ||
12 | #--privte-bin (list) - fs_bin.c | ||
13 | #--private-home (list) - fs_home.c | ||
14 | #--private-etc (list) - fs_etc.c | ||
15 | #--profile - main.c | ||
16 | #--read_only - profile.c | ||
17 | #--shell - main.c | ||
18 | #--tmpfs - profile.c | ||
19 | #--white-list | ||
20 | |||
21 | |||
22 | set timeout 10 | ||
23 | spawn $env(SHELL) | ||
24 | match_max 100000 | ||
25 | |||
26 | send -- "firejail --debug-check-filename --noprofile --blacklist=\"bla&&bla\"\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
29 | "Checking filename bla&&bla" | ||
30 | } | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
33 | "Error:" | ||
34 | } | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
37 | "is an invalid filename" | ||
38 | } | ||
39 | after 100 | ||
40 | |||
41 | send -- "firejail --debug-check-filename --noprofile --cgroup=\"bla&&bla\"\r" | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 2.1\n";exit} | ||
44 | "Checking filename bla&&bla" | ||
45 | } | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 2.2\n";exit} | ||
48 | "Error:" | ||
49 | } | ||
50 | expect { | ||
51 | timeout {puts "TESTING ERROR 2.3\n";exit} | ||
52 | "is an invalid filename" | ||
53 | } | ||
54 | after 100 | ||
55 | |||
56 | send -- "firejail --debug-check-filename --noprofile --chroot=\"bla&&bla\"\r" | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
59 | "Checking filename bla&&bla" {puts "normal system\n"} | ||
60 | "Error: --chroot option is not available on Grsecurity systems" { puts "\nall done\n"; exit} | ||
61 | } | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
64 | "Error:" | ||
65 | } | ||
66 | expect { | ||
67 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
68 | "is an invalid filename" | ||
69 | } | ||
70 | after 100 | ||
71 | |||
72 | send -- "firejail --debug-check-filename --noprofile --netfilter=\"bla&&bla\"\r" | ||
73 | expect { | ||
74 | timeout {puts "TESTING ERROR 4.1\n";exit} | ||
75 | "Checking filename bla&&bla" | ||
76 | } | ||
77 | expect { | ||
78 | timeout {puts "TESTING ERROR 4.2\n";exit} | ||
79 | "Error:" | ||
80 | } | ||
81 | expect { | ||
82 | timeout {puts "TESTING ERROR 4.3\n";exit} | ||
83 | "is an invalid filename" | ||
84 | } | ||
85 | after 100 | ||
86 | |||
87 | send -- "firejail --debug-check-filename --noprofile --output=\"bla&&bla\"\r" | ||
88 | expect { | ||
89 | timeout {puts "TESTING ERROR 5.2\n";exit} | ||
90 | "Error:" | ||
91 | } | ||
92 | expect { | ||
93 | timeout {puts "TESTING ERROR 5.3\n";exit} | ||
94 | "is an invalid filename" | ||
95 | } | ||
96 | after 100 | ||
97 | |||
98 | send -- "firejail --debug-check-filename --noprofile --private=\"bla&&bla\"\r" | ||
99 | expect { | ||
100 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
101 | "Checking filename bla&&bla" | ||
102 | } | ||
103 | expect { | ||
104 | timeout {puts "TESTING ERROR 6.2\n";exit} | ||
105 | "Error:" | ||
106 | } | ||
107 | expect { | ||
108 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
109 | "is an invalid filename" | ||
110 | } | ||
111 | after 100 | ||
112 | |||
113 | send -- "firejail --debug-check-filename --noprofile --private-bin=\"bla&&bla\"\r" | ||
114 | expect { | ||
115 | timeout {puts "TESTING ERROR 7.1\n";exit} | ||
116 | "Checking filename bla&&bla" | ||
117 | } | ||
118 | expect { | ||
119 | timeout {puts "TESTING ERROR 7.2\n";exit} | ||
120 | "Error:" | ||
121 | } | ||
122 | expect { | ||
123 | timeout {puts "TESTING ERROR 7.3\n";exit} | ||
124 | "is an invalid filename" | ||
125 | } | ||
126 | after 100 | ||
127 | |||
128 | send -- "firejail --debug-check-filename --noprofile --private-etc=\"bla&&bla\"\r" | ||
129 | expect { | ||
130 | timeout {puts "TESTING ERROR 9.1\n";exit} | ||
131 | "Checking filename bla&&bla" | ||
132 | } | ||
133 | expect { | ||
134 | timeout {puts "TESTING ERROR 9.2\n";exit} | ||
135 | "Error:" | ||
136 | } | ||
137 | expect { | ||
138 | timeout {puts "TESTING ERROR 9.3\n";exit} | ||
139 | "is an invalid filename" | ||
140 | } | ||
141 | after 100 | ||
142 | |||
143 | send -- "firejail --debug-check-filename --profile=\"bla&&bla\"\r" | ||
144 | expect { | ||
145 | timeout {puts "TESTING ERROR 10.1\n";exit} | ||
146 | "Checking filename bla&&bla" | ||
147 | } | ||
148 | expect { | ||
149 | timeout {puts "TESTING ERROR 10.2\n";exit} | ||
150 | "Error:" | ||
151 | } | ||
152 | expect { | ||
153 | timeout {puts "TESTING ERROR 10.3\n";exit} | ||
154 | "is an invalid filename" | ||
155 | } | ||
156 | after 100 | ||
157 | |||
158 | send -- "firejail --debug-check-filename --read-only=\"bla&&bla\"\r" | ||
159 | expect { | ||
160 | timeout {puts "TESTING ERROR 11.1\n";exit} | ||
161 | "Checking filename bla&&bla" | ||
162 | } | ||
163 | expect { | ||
164 | timeout {puts "TESTING ERROR 11.2\n";exit} | ||
165 | "Error:" | ||
166 | } | ||
167 | expect { | ||
168 | timeout {puts "TESTING ERROR 11.3\n";exit} | ||
169 | "is an invalid filename" | ||
170 | } | ||
171 | after 100 | ||
172 | |||
173 | send -- "firejail --debug-check-filename --shell=\"bla&&bla\"\r" | ||
174 | expect { | ||
175 | timeout {puts "TESTING ERROR 12.1\n";exit} | ||
176 | "Checking filename bla&&bla" | ||
177 | } | ||
178 | expect { | ||
179 | timeout {puts "TESTING ERROR 12.2\n";exit} | ||
180 | "Error:" | ||
181 | } | ||
182 | expect { | ||
183 | timeout {puts "TESTING ERROR 12.3\n";exit} | ||
184 | "is an invalid filename" | ||
185 | } | ||
186 | after 100 | ||
187 | |||
188 | |||
189 | send -- "firejail --debug-check-filename --whitelist=\"bla&&bla\"\r" | ||
190 | expect { | ||
191 | timeout {puts "TESTING ERROR 14.1\n";exit} | ||
192 | "Checking filename bla&&bla" | ||
193 | } | ||
194 | expect { | ||
195 | timeout {puts "TESTING ERROR 14.2\n";exit} | ||
196 | "Error:" | ||
197 | } | ||
198 | expect { | ||
199 | timeout {puts "TESTING ERROR 14.3\n";exit} | ||
200 | "is an invalid filename" | ||
201 | } | ||
202 | after 100 | ||
203 | |||
204 | |||
205 | |||
206 | puts "\nall done\n" | ||
207 | |||