aboutsummaryrefslogtreecommitdiffstats
path: root/test/invalid_filename.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-05-05 10:22:18 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-05-05 10:22:18 -0400
commit37a5a3545ef6d8d03dad8bbd888f53e13274c9e5 (patch)
tree5d56a4b0a0933963d97eb0a88dd00fec9ea58bf2 /test/invalid_filename.exp
parentrename generic.profile as default.profile (diff)
downloadfirejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.tar.gz
firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.tar.zst
firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.zip
testing
Diffstat (limited to 'test/invalid_filename.exp')
-rwxr-xr-xtest/invalid_filename.exp207
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
22set timeout 10
23spawn $env(SHELL)
24match_max 100000
25
26send -- "firejail --debug-check-filename --noprofile --blacklist=\"bla&&bla\"\r"
27expect {
28 timeout {puts "TESTING ERROR 1.1\n";exit}
29 "Checking filename bla&&bla"
30}
31expect {
32 timeout {puts "TESTING ERROR 1.2\n";exit}
33 "Error:"
34}
35expect {
36 timeout {puts "TESTING ERROR 1.3\n";exit}
37 "is an invalid filename"
38}
39after 100
40
41send -- "firejail --debug-check-filename --noprofile --cgroup=\"bla&&bla\"\r"
42expect {
43 timeout {puts "TESTING ERROR 2.1\n";exit}
44 "Checking filename bla&&bla"
45}
46expect {
47 timeout {puts "TESTING ERROR 2.2\n";exit}
48 "Error:"
49}
50expect {
51 timeout {puts "TESTING ERROR 2.3\n";exit}
52 "is an invalid filename"
53}
54after 100
55
56send -- "firejail --debug-check-filename --noprofile --chroot=\"bla&&bla\"\r"
57expect {
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}
62expect {
63 timeout {puts "TESTING ERROR 3.2\n";exit}
64 "Error:"
65}
66expect {
67 timeout {puts "TESTING ERROR 3.3\n";exit}
68 "is an invalid filename"
69}
70after 100
71
72send -- "firejail --debug-check-filename --noprofile --netfilter=\"bla&&bla\"\r"
73expect {
74 timeout {puts "TESTING ERROR 4.1\n";exit}
75 "Checking filename bla&&bla"
76}
77expect {
78 timeout {puts "TESTING ERROR 4.2\n";exit}
79 "Error:"
80}
81expect {
82 timeout {puts "TESTING ERROR 4.3\n";exit}
83 "is an invalid filename"
84}
85after 100
86
87send -- "firejail --debug-check-filename --noprofile --output=\"bla&&bla\"\r"
88expect {
89 timeout {puts "TESTING ERROR 5.2\n";exit}
90 "Error:"
91}
92expect {
93 timeout {puts "TESTING ERROR 5.3\n";exit}
94 "is an invalid filename"
95}
96after 100
97
98send -- "firejail --debug-check-filename --noprofile --private=\"bla&&bla\"\r"
99expect {
100 timeout {puts "TESTING ERROR 6.1\n";exit}
101 "Checking filename bla&&bla"
102}
103expect {
104 timeout {puts "TESTING ERROR 6.2\n";exit}
105 "Error:"
106}
107expect {
108 timeout {puts "TESTING ERROR 6.3\n";exit}
109 "is an invalid filename"
110}
111after 100
112
113send -- "firejail --debug-check-filename --noprofile --private-bin=\"bla&&bla\"\r"
114expect {
115 timeout {puts "TESTING ERROR 7.1\n";exit}
116 "Checking filename bla&&bla"
117}
118expect {
119 timeout {puts "TESTING ERROR 7.2\n";exit}
120 "Error:"
121}
122expect {
123 timeout {puts "TESTING ERROR 7.3\n";exit}
124 "is an invalid filename"
125}
126after 100
127
128send -- "firejail --debug-check-filename --noprofile --private-etc=\"bla&&bla\"\r"
129expect {
130 timeout {puts "TESTING ERROR 9.1\n";exit}
131 "Checking filename bla&&bla"
132}
133expect {
134 timeout {puts "TESTING ERROR 9.2\n";exit}
135 "Error:"
136}
137expect {
138 timeout {puts "TESTING ERROR 9.3\n";exit}
139 "is an invalid filename"
140}
141after 100
142
143send -- "firejail --debug-check-filename --profile=\"bla&&bla\"\r"
144expect {
145 timeout {puts "TESTING ERROR 10.1\n";exit}
146 "Checking filename bla&&bla"
147}
148expect {
149 timeout {puts "TESTING ERROR 10.2\n";exit}
150 "Error:"
151}
152expect {
153 timeout {puts "TESTING ERROR 10.3\n";exit}
154 "is an invalid filename"
155}
156after 100
157
158send -- "firejail --debug-check-filename --read-only=\"bla&&bla\"\r"
159expect {
160 timeout {puts "TESTING ERROR 11.1\n";exit}
161 "Checking filename bla&&bla"
162}
163expect {
164 timeout {puts "TESTING ERROR 11.2\n";exit}
165 "Error:"
166}
167expect {
168 timeout {puts "TESTING ERROR 11.3\n";exit}
169 "is an invalid filename"
170}
171after 100
172
173send -- "firejail --debug-check-filename --shell=\"bla&&bla\"\r"
174expect {
175 timeout {puts "TESTING ERROR 12.1\n";exit}
176 "Checking filename bla&&bla"
177}
178expect {
179 timeout {puts "TESTING ERROR 12.2\n";exit}
180 "Error:"
181}
182expect {
183 timeout {puts "TESTING ERROR 12.3\n";exit}
184 "is an invalid filename"
185}
186after 100
187
188
189send -- "firejail --debug-check-filename --whitelist=\"bla&&bla\"\r"
190expect {
191 timeout {puts "TESTING ERROR 14.1\n";exit}
192 "Checking filename bla&&bla"
193}
194expect {
195 timeout {puts "TESTING ERROR 14.2\n";exit}
196 "Error:"
197}
198expect {
199 timeout {puts "TESTING ERROR 14.3\n";exit}
200 "is an invalid filename"
201}
202after 100
203
204
205
206puts "\nall done\n"
207