aboutsummaryrefslogtreecommitdiffstats
path: root/test/profile_syntax.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-08 19:12:30 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-08 19:12:30 -0400
commit1379851360349d6617ad32944a25ee5e2bb74fc2 (patch)
treef69b48e90708bfa3c2723d5a27ed3e024c827b43 /test/profile_syntax.exp
parentdelete files (diff)
downloadfirejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip
Baseline firejail 0.9.28
Diffstat (limited to 'test/profile_syntax.exp')
-rwxr-xr-xtest/profile_syntax.exp69
1 files changed, 69 insertions, 0 deletions
diff --git a/test/profile_syntax.exp b/test/profile_syntax.exp
new file mode 100755
index 000000000..3218177c3
--- /dev/null
+++ b/test/profile_syntax.exp
@@ -0,0 +1,69 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --profile=test.profile\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12
13sleep 2
14send -- "ls /sbin\r"
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "cannot open"
18}
19
20sleep 1
21send -- "ls /usr/sbin\r"
22expect {
23 timeout {puts "TESTING ERROR 2\n";exit}
24 "cannot open"
25}
26
27sleep 1
28send -- "ls -l /etc/shadow\r"
29expect {
30 timeout {puts "TESTING ERROR 3\n";exit}
31 "root root 0"
32}
33
34sleep 1
35send -- "rmdir;pwd\r"
36expect {
37 timeout {puts "TESTING ERROR 4\n";exit}
38 "Permission denied"
39}
40expect {
41 timeout {puts "TESTING ERROR 5\n";exit}
42 "home"
43}
44
45sleep 1
46send -- "mount;pwd\r"
47expect {
48 timeout {puts "TESTING ERROR 6\n";exit}
49 "Permission denied"
50}
51expect {
52 timeout {puts "TESTING ERROR 7\n";exit}
53 "home"
54}
55
56sleep 1
57send -- "umount;pwd\r"
58expect {
59 timeout {puts "TESTING ERROR 8\n";exit}
60 "Permission denied"
61}
62expect {
63 timeout {puts "TESTING ERROR 9\n";exit}
64 "home"
65}
66send -- "exit\r"
67
68sleep 1
69puts "\n"