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