aboutsummaryrefslogtreecommitdiffstats
path: root/test/firemon-caps.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/firemon-caps.exp
parentdelete files (diff)
downloadfirejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip
Baseline firejail 0.9.28
Diffstat (limited to 'test/firemon-caps.exp')
-rwxr-xr-xtest/firemon-caps.exp135
1 files changed, 135 insertions, 0 deletions
diff --git a/test/firemon-caps.exp b/test/firemon-caps.exp
new file mode 100755
index 000000000..547d04c02
--- /dev/null
+++ b/test/firemon-caps.exp
@@ -0,0 +1,135 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --name=bingo1 --caps\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12sleep 1
13
14spawn $env(SHELL)
15send -- "firejail --name=bingo2\r"
16expect {
17 timeout {puts "TESTING ERROR 0\n";exit}
18 "Child process initialized"
19}
20sleep 1
21
22spawn $env(SHELL)
23send -- "firejail --name=bingo3 --caps.drop=all\r"
24expect {
25 timeout {puts "TESTING ERROR 0\n";exit}
26 "Child process initialized"
27}
28sleep 1
29
30spawn $env(SHELL)
31send -- "firejail --name=bingo4 --caps.drop=chown,kill\r"
32expect {
33 timeout {puts "TESTING ERROR 0\n";exit}
34 "Child process initialized"
35}
36sleep 1
37
38spawn $env(SHELL)
39send -- "firejail --name=bingo5 --caps.keep=chown,kill\r"
40expect {
41 timeout {puts "TESTING ERROR 0\n";exit}
42 "Child process initialized"
43}
44sleep 1
45
46spawn $env(SHELL)
47send -- "firejail --name=bingo6 --profile=caps1.profile\r"
48expect {
49 timeout {puts "TESTING ERROR 0\n";exit}
50 "Child process initialized"
51}
52sleep 1
53
54spawn $env(SHELL)
55send -- "firejail --name=bingo7 --profile=caps2.profile\r"
56expect {
57 timeout {puts "TESTING ERROR 0\n";exit}
58 "Child process initialized"
59}
60sleep 1
61
62
63
64
65spawn $env(SHELL)
66send -- "firemon --caps\r"
67expect {
68 timeout {puts "TESTING ERROR 1\n";exit}
69 "bingo1"
70}
71expect {
72 timeout {puts "TESTING ERROR 2\n";exit}
73 "31cffff"
74}
75expect {
76 timeout {puts "TESTING ERROR 3\n";exit}
77 "bingo2"
78}
79expect {
80 timeout {puts "TESTING ERROR 4\n";exit}
81 "fffffff"
82}
83expect {
84 timeout {puts "TESTING ERROR 5\n";exit}
85 "bingo3"
86}
87expect {
88 timeout {puts "TESTING ERROR 6\n";exit}
89 "000000000000"
90}
91
92expect {
93 timeout {puts "TESTING ERROR 7\n";exit}
94 "bingo4"
95}
96expect {
97 timeout {puts "TESTING ERROR 8\n";exit}
98 "ffffffde"
99}
100expect {
101 timeout {puts "TESTING ERROR 7\n";exit}
102 "bingo5"
103}
104expect {
105 timeout {puts "TESTING ERROR 9\n";exit}
106 "0000000000000021"
107}
108
109expect {
110 timeout {puts "TESTING ERROR 10\n";exit}
111 "bingo6"
112}
113expect {
114 timeout {puts "TESTING ERROR 11\n";exit}
115 "ffffffde"
116}
117expect {
118 timeout {puts "TESTING ERROR 12\n";exit}
119 "bingo7"
120}
121expect {
122 timeout {puts "TESTING ERROR 13\n";exit}
123 "0000000000000021"
124}
125
126
127
128
129
130
131
132sleep 1
133
134puts "\n"
135