aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/firemon-caps.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/firemon-caps.exp')
-rwxr-xr-xtest/utils/firemon-caps.exp129
1 files changed, 0 insertions, 129 deletions
diff --git a/test/utils/firemon-caps.exp b/test/utils/firemon-caps.exp
deleted file mode 100755
index 621447d45..000000000
--- a/test/utils/firemon-caps.exp
+++ /dev/null
@@ -1,129 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2023 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=bingo1 --noprofile --caps\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14}
15sleep 1
16
17spawn $env(SHELL)
18send -- "firejail --name=bingo2 --noprofile\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22}
23sleep 1
24
25spawn $env(SHELL)
26send -- "firejail --name=bingo3 --noprofile --caps.drop=all\r"
27expect {
28 timeout {puts "TESTING ERROR 2\n";exit}
29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30}
31sleep 1
32
33spawn $env(SHELL)
34send -- "firejail --noprofile --name=bingo4 --caps.drop=chown,kill\r"
35expect {
36 timeout {puts "TESTING ERROR 3\n";exit}
37 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
38}
39sleep 1
40
41spawn $env(SHELL)
42send -- "firejail --noprofile --name=bingo5 --caps.keep=chown,kill\r"
43expect {
44 timeout {puts "TESTING ERROR 4\n";exit}
45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
46}
47sleep 1
48
49spawn $env(SHELL)
50send -- "firejail --name=bingo6 --profile=caps1.profile\r"
51expect {
52 timeout {puts "TESTING ERROR 5\n";exit}
53 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
54}
55sleep 1
56
57spawn $env(SHELL)
58send -- "firejail --name=bingo7 --profile=caps2.profile\r"
59expect {
60 timeout {puts "TESTING ERROR 0\n";exit}
61 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
62}
63sleep 1
64
65spawn $env(SHELL)
66send -- "firemon --caps\r"
67expect {
68 timeout {puts "TESTING ERROR 8.1\n";exit}
69 "need to be root" {puts "TESTING SKIP: /proc mounted as hidepid\n"; exit}
70 "bingo1"
71}
72expect {
73 timeout {puts "TESTING ERROR 8.2\n";exit}
74 "31cffff"
75}
76expect {
77 timeout {puts "TESTING ERROR 8.3\n";exit}
78 "bingo2"
79}
80expect {
81 timeout {puts "TESTING ERROR 8.4\n";exit}
82 "fffffff"
83}
84expect {
85 timeout {puts "TESTING ERROR 8.5\n";exit}
86 "bingo3"
87}
88expect {
89 timeout {puts "TESTING ERROR 8.6\n";exit}
90 "000000000000"
91}
92
93expect {
94 timeout {puts "TESTING ERROR 8.7\n";exit}
95 "bingo4"
96}
97expect {
98 timeout {puts "TESTING ERROR 8.8\n";exit}
99 "ffffffde"
100}
101expect {
102 timeout {puts "TESTING ERROR 8.9\n";exit}
103 "bingo5"
104}
105expect {
106 timeout {puts "TESTING ERROR 8.10\n";exit}
107 "0000000000000021"
108}
109
110expect {
111 timeout {puts "TESTING ERROR 8.11\n";exit}
112 "bingo6"
113}
114expect {
115 timeout {puts "TESTING ERROR 8.12\n";exit}
116 "ffffffde"
117}
118expect {
119 timeout {puts "TESTING ERROR 8.13\n";exit}
120 "bingo7"
121}
122expect {
123 timeout {puts "TESTING ERROR 8.14\n";exit}
124 "0000000000000021"
125}
126
127after 100
128
129puts "all done\n"