aboutsummaryrefslogtreecommitdiffstats
path: root/test/seccomp-empty.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/seccomp-empty.exp
parentdelete files (diff)
downloadfirejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip
Baseline firejail 0.9.28
Diffstat (limited to 'test/seccomp-empty.exp')
-rwxr-xr-xtest/seccomp-empty.exp145
1 files changed, 145 insertions, 0 deletions
diff --git a/test/seccomp-empty.exp b/test/seccomp-empty.exp
new file mode 100755
index 000000000..11abf2e00
--- /dev/null
+++ b/test/seccomp-empty.exp
@@ -0,0 +1,145 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --debug --seccomp=chmod,fchmod,fchmodat --private\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "VALIDATE_ARCHITECTURE"
11}
12expect {
13 timeout {puts "TESTING ERROR 0.1\n";exit}
14 "mount"
15}
16expect {
17 timeout {puts "TESTING ERROR 0.2\n";exit}
18 "ptrace"
19}
20expect {
21 timeout {puts "TESTING ERROR 0.3\n";exit}
22 "chmod"
23}
24expect {
25 timeout {puts "TESTING ERROR 0.4\n";exit}
26 "fchmod"
27}
28expect {
29 timeout {puts "TESTING ERROR 0.5\n";exit}
30 "fchmodat"
31}
32expect {
33 timeout {puts "TESTING ERROR 0.6\n";exit}
34 "RETURN_ALLOW"
35}
36expect {
37 timeout {puts "TESTING ERROR 0.7\n";exit}
38 "Child process initialized"
39}
40sleep 2
41send -- "exit\r"
42sleep 3
43puts "\n"
44
45send -- "firejail --debug --seccomp.drop=chmod,fchmod,fchmodat --private\r"
46expect {
47 timeout {puts "TESTING ERROR 1\n";exit}
48 "VALIDATE_ARCHITECTURE"
49}
50expect {
51 timeout {puts "TESTING ERROR 1.1\n";exit}
52 "mount" {puts "TESTING ERROR 1.2\n";exit}
53 "ptrace" {puts "TESTING ERROR 1.3\n";exit}
54 "chmod"
55}
56expect {
57 timeout {puts "TESTING ERROR 1.4\n";exit}
58 "fchmod"
59}
60expect {
61 timeout {puts "TESTING ERROR 1.5\n";exit}
62 "fchmodat"
63}
64expect {
65 timeout {puts "TESTING ERROR 1.6\n";exit}
66 "RETURN_ALLOW"
67}
68expect {
69 timeout {puts "TESTING ERROR 1.7\n";exit}
70 "Child process initialized"
71}
72sleep 2
73send -- "exit\r"
74puts "\n"
75
76sleep 2
77send -- "firejail --debug --profile=seccomp.profile --private\r"
78expect {
79 timeout {puts "TESTING ERROR 2\n";exit}
80 "VALIDATE_ARCHITECTURE"
81}
82expect {
83 timeout {puts "TESTING ERROR 2.1\n";exit}
84 "mount"
85}
86expect {
87 timeout {puts "TESTING ERROR 2.2\n";exit}
88 "ptrace"
89}
90expect {
91 timeout {puts "TESTING ERROR 2.3\n";exit}
92 "chmod"
93}
94expect {
95 timeout {puts "TESTING ERROR 2.4\n";exit}
96 "fchmod"
97}
98expect {
99 timeout {puts "TESTING ERROR 2.5\n";exit}
100 "fchmodat"
101}
102expect {
103 timeout {puts "TESTING ERROR 2.6\n";exit}
104 "RETURN_ALLOW"
105}
106expect {
107 timeout {puts "TESTING ERROR 2.7\n";exit}
108 "Child process initialized"
109}
110sleep 2
111send -- "exit\r"
112sleep 3
113puts "\n"
114
115send -- "firejail --debug --profile=seccomp-empty.profile --private\r"
116expect {
117 timeout {puts "TESTING ERROR 3\n";exit}
118 "VALIDATE_ARCHITECTURE"
119}
120expect {
121 timeout {puts "TESTING ERROR 3.1\n";exit}
122 "mount" {puts "TESTING ERROR 3.2\n";exit}
123 "ptrace" {puts "TESTING ERROR 3.3\n";exit}
124 "chmod"
125}
126expect {
127 timeout {puts "TESTING ERROR 3.4\n";exit}
128 "fchmod"
129}
130expect {
131 timeout {puts "TESTING ERROR 3.5\n";exit}
132 "fchmodat"
133}
134expect {
135 timeout {puts "TESTING ERROR 3.6\n";exit}
136 "RETURN_ALLOW"
137}
138expect {
139 timeout {puts "TESTING ERROR 3.7\n";exit}
140 "Child process initialized"
141}
142sleep 2
143send -- "exit\r"
144puts "\n"
145