diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/fs_chroot.exp | 4 | ||||
-rwxr-xr-x | test/fs_overlay.exp | 4 | ||||
-rwxr-xr-x | test/name.exp | 4 | ||||
-rwxr-xr-x | test/noroot.exp | 8 | ||||
-rwxr-xr-x | test/option-trace.exp | 14 | ||||
-rwxr-xr-x | test/private-keep.exp | 38 | ||||
-rwxr-xr-x | test/private.exp | 6 | ||||
-rwxr-xr-x | test/seccomp-ptrace.exp | 4 | ||||
-rwxr-xr-x | test/seccomp-su.exp | 4 |
9 files changed, 43 insertions, 43 deletions
diff --git a/test/fs_chroot.exp b/test/fs_chroot.exp index ba832337b..448a00a7a 100755 --- a/test/fs_chroot.exp +++ b/test/fs_chroot.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --chroot=/tmp/chroot\r" | 7 | send -- "firejail --noprofile --chroot=/tmp/chroot\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Child process initialized" | 10 | "Child process initialized" |
@@ -50,5 +50,5 @@ expect { | |||
50 | } | 50 | } |
51 | sleep 1 | 51 | sleep 1 |
52 | 52 | ||
53 | puts "\n" | 53 | puts "all done\n" |
54 | 54 | ||
diff --git a/test/fs_overlay.exp b/test/fs_overlay.exp index 166970a5c..dcfe1e2e4 100755 --- a/test/fs_overlay.exp +++ b/test/fs_overlay.exp | |||
@@ -16,7 +16,7 @@ expect { | |||
16 | "home" | 16 | "home" |
17 | } | 17 | } |
18 | 18 | ||
19 | send -- "firejail --overlay\r" | 19 | send -- "firejail --noprofile --overlay\r" |
20 | expect { | 20 | expect { |
21 | timeout {puts "TESTING ERROR 2\n";exit} | 21 | timeout {puts "TESTING ERROR 2\n";exit} |
22 | "Child process initialized" | 22 | "Child process initialized" |
@@ -60,5 +60,5 @@ expect { | |||
60 | 60 | ||
61 | 61 | ||
62 | sleep 1 | 62 | sleep 1 |
63 | puts "\n" | 63 | puts "all done \n" |
64 | 64 | ||
diff --git a/test/name.exp b/test/name.exp index 704b8315e..42f78dd12 100755 --- a/test/name.exp +++ b/test/name.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --name=baluba\r" | 7 | send -- "firejail --name=baluba --noprofile\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 1\n";exit} | 9 | timeout {puts "TESTING ERROR 1\n";exit} |
10 | "Child process initialized" | 10 | "Child process initialized" |
@@ -22,4 +22,4 @@ expect { | |||
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
25 | puts "\n" | 25 | puts "all done\n" |
diff --git a/test/noroot.exp b/test/noroot.exp index 78991d4a9..d16c28dbe 100755 --- a/test/noroot.exp +++ b/test/noroot.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --debug --noroot --caps.drop=all --seccomp --cpu=0,1 --name=noroot-sandbox\r" | 7 | send -- "firejail --debug --noprofile --noroot --caps.drop=all --seccomp --cpu=0,1 --name=noroot-sandbox\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0.1\n";exit} | 9 | timeout {puts "TESTING ERROR 0.1\n";exit} |
10 | "Child process initialized" | 10 | "Child process initialized" |
@@ -75,7 +75,7 @@ send -- "exit\r" | |||
75 | sleep 2 | 75 | sleep 2 |
76 | 76 | ||
77 | 77 | ||
78 | send -- "firejail --noroot\r" | 78 | send -- "firejail --noroot --noprofile\r" |
79 | expect { | 79 | expect { |
80 | timeout {puts "TESTING ERROR 6\n";exit} | 80 | timeout {puts "TESTING ERROR 6\n";exit} |
81 | "Child process initialized" | 81 | "Child process initialized" |
@@ -96,7 +96,7 @@ puts "\n" | |||
96 | send -- "exit\r" | 96 | send -- "exit\r" |
97 | sleep 2 | 97 | sleep 2 |
98 | 98 | ||
99 | send -- "firejail --name=test --noroot\r" | 99 | send -- "firejail --name=test --noroot --noprofile\r" |
100 | expect { | 100 | expect { |
101 | timeout {puts "TESTING ERROR 9\n";exit} | 101 | timeout {puts "TESTING ERROR 9\n";exit} |
102 | "Child process initialized" | 102 | "Child process initialized" |
@@ -121,4 +121,4 @@ expect { | |||
121 | "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";} | 121 | "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";} |
122 | "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";} | 122 | "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";} |
123 | } | 123 | } |
124 | puts "\n" | 124 | puts "all done\n" |
diff --git a/test/option-trace.exp b/test/option-trace.exp index b8f723fb8..1d97df9b3 100755 --- a/test/option-trace.exp +++ b/test/option-trace.exp | |||
@@ -4,28 +4,24 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --trace firefox --name=testing\r" | 7 | send -- "firejail --trace\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Child process initialized" | 10 | "Child process initialized" |
11 | } | 11 | } |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 1\n";exit} | 13 | timeout {puts "TESTING ERROR 1\n";exit} |
14 | "command not found" {puts "\nTESTING: not tested, firefox not found\n"; exit} | 14 | "1:bash:open /dev/tty" |
15 | "1:firefox:open" {puts "\n"} | ||
16 | "1:iceweasel:open" | ||
17 | } | 15 | } |
18 | expect { | 16 | expect { |
19 | timeout {puts "TESTING ERROR 2\n";exit} | 17 | timeout {puts "TESTING ERROR 2\n";exit} |
20 | "1:firefox:access" {puts "\n"} | 18 | "1:bash:fopen /etc/passwd" |
21 | "1:iceweasel:access" | ||
22 | } | 19 | } |
23 | expect { | 20 | expect { |
24 | timeout {puts "TESTING ERROR 3\n";exit} | 21 | timeout {puts "TESTING ERROR 3\n";exit} |
25 | "1:firefox:connect" {puts "\n"} | 22 | "1:bash:access /etc/terminfo/x/xterm" |
26 | "1:iceweasel:connect" | ||
27 | } | 23 | } |
28 | 24 | ||
29 | sleep 1 | 25 | sleep 1 |
30 | 26 | ||
31 | puts "\n" | 27 | puts "all done\n" |
diff --git a/test/private-keep.exp b/test/private-keep.exp index 027020ce9..163aa2741 100755 --- a/test/private-keep.exp +++ b/test/private-keep.exp | |||
@@ -5,7 +5,7 @@ spawn $env(SHELL) | |||
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | #************************************************************** | 7 | #************************************************************** |
8 | send -- "firejail --private-home=.mozilla,.config/firejail\r" | 8 | send -- "firejail --noprofile --private-home=.mozilla,.config/firejail\r" |
9 | expect { | 9 | expect { |
10 | timeout {puts "TESTING ERROR 0\n";exit} | 10 | timeout {puts "TESTING ERROR 0\n";exit} |
11 | "Child process initialized" | 11 | "Child process initialized" |
@@ -73,7 +73,7 @@ sleep 2 | |||
73 | 73 | ||
74 | 74 | ||
75 | #************************************************************** | 75 | #************************************************************** |
76 | send -- "firejail --private-home=~/.mozilla,~/.config/firejail\r" | 76 | send -- "firejail --noprofile --private-home=~/.mozilla,~/.config/firejail\r" |
77 | expect { | 77 | expect { |
78 | timeout {puts "TESTING ERROR 2\n";exit} | 78 | timeout {puts "TESTING ERROR 2\n";exit} |
79 | "Child process initialized" | 79 | "Child process initialized" |
@@ -107,31 +107,31 @@ sleep 2 | |||
107 | 107 | ||
108 | 108 | ||
109 | #************************************************************** | 109 | #************************************************************** |
110 | send -- "firejail --private-home=~/.mozilla,~/.config/firejail\r" | 110 | send -- "firejail --noprofile --private-home=~/.mozilla,~/.config/firejail\r" |
111 | expect { | 111 | expect { |
112 | timeout {puts "TESTING ERROR 2\n";exit} | 112 | timeout {puts "TESTING ERROR 3\n";exit} |
113 | "Child process initialized" | 113 | "Child process initialized" |
114 | } | 114 | } |
115 | sleep 1 | 115 | sleep 1 |
116 | 116 | ||
117 | send -- "ls -al\r" | 117 | send -- "ls -al\r" |
118 | expect { | 118 | expect { |
119 | timeout {puts "TESTING ERROR 2.1\n";exit} | 119 | timeout {puts "TESTING ERROR 3.1\n";exit} |
120 | ".config" | 120 | ".config" |
121 | } | 121 | } |
122 | expect { | 122 | expect { |
123 | timeout {puts "TESTING ERROR 2.2\n";exit} | 123 | timeout {puts "TESTING ERROR 3.2\n";exit} |
124 | ".mozilla" | 124 | ".mozilla" |
125 | } | 125 | } |
126 | sleep 1 | 126 | sleep 1 |
127 | 127 | ||
128 | send -- "find .config\r" | 128 | send -- "find .config\r" |
129 | expect { | 129 | expect { |
130 | timeout {puts "TESTING ERROR 2.3\n";exit} | 130 | timeout {puts "TESTING ERROR 3.3\n";exit} |
131 | ".config" | 131 | ".config" |
132 | } | 132 | } |
133 | expect { | 133 | expect { |
134 | timeout {puts "TESTING ERROR 2.4\n";exit} | 134 | timeout {puts "TESTING ERROR 3.4\n";exit} |
135 | ".config/firejail" | 135 | ".config/firejail" |
136 | } | 136 | } |
137 | sleep 1 | 137 | sleep 1 |
@@ -140,31 +140,31 @@ send -- "exit\r" | |||
140 | sleep 2 | 140 | sleep 2 |
141 | 141 | ||
142 | #************************************************************** | 142 | #************************************************************** |
143 | send -- "firejail --private-home=/home/netblue/.mozilla,/home/netblue/.config/firejail\r" | 143 | send -- "firejail --noprofile --private-home=/home/netblue/.mozilla,/home/netblue/.config/firejail\r" |
144 | expect { | 144 | expect { |
145 | timeout {puts "TESTING ERROR 3\n";exit} | 145 | timeout {puts "TESTING ERROR 4\n";exit} |
146 | "Child process initialized" | 146 | "Child process initialized" |
147 | } | 147 | } |
148 | sleep 1 | 148 | sleep 1 |
149 | 149 | ||
150 | send -- "ls -al\r" | 150 | send -- "ls -al\r" |
151 | expect { | 151 | expect { |
152 | timeout {puts "TESTING ERROR 3.1\n";exit} | 152 | timeout {puts "TESTING ERROR 4.1\n";exit} |
153 | ".config" | 153 | ".config" |
154 | } | 154 | } |
155 | expect { | 155 | expect { |
156 | timeout {puts "TESTING ERROR 3.2\n";exit} | 156 | timeout {puts "TESTING ERROR 4.2\n";exit} |
157 | ".mozilla" | 157 | ".mozilla" |
158 | } | 158 | } |
159 | sleep 1 | 159 | sleep 1 |
160 | 160 | ||
161 | send -- "find .config\r" | 161 | send -- "find .config\r" |
162 | expect { | 162 | expect { |
163 | timeout {puts "TESTING ERROR 3.3\n";exit} | 163 | timeout {puts "TESTING ERROR 4.3\n";exit} |
164 | ".config" | 164 | ".config" |
165 | } | 165 | } |
166 | expect { | 166 | expect { |
167 | timeout {puts "TESTING ERROR 3.4\n";exit} | 167 | timeout {puts "TESTING ERROR 4.4\n";exit} |
168 | ".config/firejail" | 168 | ".config/firejail" |
169 | } | 169 | } |
170 | sleep 1 | 170 | sleep 1 |
@@ -173,18 +173,20 @@ send -- "exit\r" | |||
173 | sleep 2 | 173 | sleep 2 |
174 | 174 | ||
175 | #************************************************************** | 175 | #************************************************************** |
176 | send -- "firejail --private-home=/home/netblue/../netblue/.mozilla,/home/netblue/.config/firejail\r" | 176 | send -- "firejail --noprofile --private-home=/home/netblue/../netblue/.mozilla,/home/netblue/.config/firejail\r" |
177 | expect { | 177 | expect { |
178 | timeout {puts "TESTING ERROR 4\n";exit} | 178 | timeout {puts "TESTING ERROR 5\n";exit} |
179 | "Error: invalid private-home list" | 179 | "Error: invalid private-home list" |
180 | } | 180 | } |
181 | sleep 1 | 181 | sleep 1 |
182 | 182 | ||
183 | #************************************************************** | 183 | #************************************************************** |
184 | send -- "firejail --private-home=/root\r" | 184 | send -- "firejail --noprofile --private-home=/root\r" |
185 | expect { | 185 | expect { |
186 | timeout {puts "TESTING ERROR 5\n";exit} | 186 | timeout {puts "TESTING ERROR 6\n";exit} |
187 | "Error: only files or directories created by the current user are allowed" | 187 | "Error: only files or directories created by the current user are allowed" |
188 | } | 188 | } |
189 | sleep 1 | 189 | sleep 1 |
190 | 190 | ||
191 | puts "all done\n" | ||
192 | |||
diff --git a/test/private.exp b/test/private.exp index e2ae80b33..6f9dadf8f 100755 --- a/test/private.exp +++ b/test/private.exp | |||
@@ -84,7 +84,9 @@ send -- "stat -c %U%a /tmp;pwd\r" | |||
84 | expect { | 84 | expect { |
85 | timeout {puts "TESTING ERROR 2\n";exit} | 85 | timeout {puts "TESTING ERROR 2\n";exit} |
86 | "root777" {puts "version 1\n";} | 86 | "root777" {puts "version 1\n";} |
87 | "root1777" {puts "version 2\n";} | 87 | "root1777" {puts "version 2\n";} |
88 | "nobody777" {puts "version 3\n";} | ||
89 | "nobody1777" {puts "version 4\n";} | ||
88 | } | 90 | } |
89 | expect { | 91 | expect { |
90 | timeout {puts "TESTING ERROR 2.1\n";exit} | 92 | timeout {puts "TESTING ERROR 2.1\n";exit} |
@@ -92,4 +94,4 @@ expect { | |||
92 | } | 94 | } |
93 | sleep 1 | 95 | sleep 1 |
94 | 96 | ||
95 | puts "\n" | 97 | puts "all done\n" |
diff --git a/test/seccomp-ptrace.exp b/test/seccomp-ptrace.exp index c5411c249..9a9b7430e 100755 --- a/test/seccomp-ptrace.exp +++ b/test/seccomp-ptrace.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --seccomp\r" | 7 | send -- "firejail --noprofile --seccomp\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Child process initialized" | 10 | "Child process initialized" |
@@ -20,4 +20,4 @@ expect { | |||
20 | 20 | ||
21 | send -- "exit\r" | 21 | send -- "exit\r" |
22 | sleep 1 | 22 | sleep 1 |
23 | puts "\n" | 23 | puts "all done\n" |
diff --git a/test/seccomp-su.exp b/test/seccomp-su.exp index dca6f15ee..dcae6f869 100755 --- a/test/seccomp-su.exp +++ b/test/seccomp-su.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --seccomp\r" | 7 | send -- "firejail --noprofile --seccomp\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Child process initialized" | 10 | "Child process initialized" |
@@ -31,4 +31,4 @@ expect { | |||
31 | 31 | ||
32 | send -- "exit\r" | 32 | send -- "exit\r" |
33 | sleep 1 | 33 | sleep 1 |
34 | puts "\n" | 34 | puts "all done\n" |