summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-28 10:34:38 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-28 10:34:38 -0400
commit01194ad1e5f38e929cb7fbbbdc4ec0ee92b8b1f2 (patch)
tree73ca26789e3aabe3f1bf0f4a8d6c87b7f0f923bc /test
parentfixed thunderbird profile to allow a browser to start (diff)
downloadfirejail-01194ad1e5f38e929cb7fbbbdc4ec0ee92b8b1f2.tar.gz
firejail-01194ad1e5f38e929cb7fbbbdc4ec0ee92b8b1f2.tar.zst
firejail-01194ad1e5f38e929cb7fbbbdc4ec0ee92b8b1f2.zip
testing default.profile
Diffstat (limited to 'test')
-rwxr-xr-xtest/fs_chroot.exp4
-rwxr-xr-xtest/fs_overlay.exp4
-rwxr-xr-xtest/name.exp4
-rwxr-xr-xtest/noroot.exp8
-rwxr-xr-xtest/option-trace.exp14
-rwxr-xr-xtest/private-keep.exp38
-rwxr-xr-xtest/private.exp6
-rwxr-xr-xtest/seccomp-ptrace.exp4
-rwxr-xr-xtest/seccomp-su.exp4
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
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "firejail --chroot=/tmp/chroot\r" 7send -- "firejail --noprofile --chroot=/tmp/chroot\r"
8expect { 8expect {
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}
51sleep 1 51sleep 1
52 52
53puts "\n" 53puts "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
19send -- "firejail --overlay\r" 19send -- "firejail --noprofile --overlay\r"
20expect { 20expect {
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
62sleep 1 62sleep 1
63puts "\n" 63puts "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
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "firejail --name=baluba\r" 7send -- "firejail --name=baluba --noprofile\r"
8expect { 8expect {
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}
23sleep 1 23sleep 1
24 24
25puts "\n" 25puts "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
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "firejail --debug --noroot --caps.drop=all --seccomp --cpu=0,1 --name=noroot-sandbox\r" 7send -- "firejail --debug --noprofile --noroot --caps.drop=all --seccomp --cpu=0,1 --name=noroot-sandbox\r"
8expect { 8expect {
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"
75sleep 2 75sleep 2
76 76
77 77
78send -- "firejail --noroot\r" 78send -- "firejail --noroot --noprofile\r"
79expect { 79expect {
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"
96send -- "exit\r" 96send -- "exit\r"
97sleep 2 97sleep 2
98 98
99send -- "firejail --name=test --noroot\r" 99send -- "firejail --name=test --noroot --noprofile\r"
100expect { 100expect {
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}
124puts "\n" 124puts "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
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "firejail --trace firefox --name=testing\r" 7send -- "firejail --trace\r"
8expect { 8expect {
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}
12expect { 12expect {
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}
18expect { 16expect {
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}
23expect { 20expect {
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
29sleep 1 25sleep 1
30 26
31puts "\n" 27puts "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)
5match_max 100000 5match_max 100000
6 6
7#************************************************************** 7#**************************************************************
8send -- "firejail --private-home=.mozilla,.config/firejail\r" 8send -- "firejail --noprofile --private-home=.mozilla,.config/firejail\r"
9expect { 9expect {
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#**************************************************************
76send -- "firejail --private-home=~/.mozilla,~/.config/firejail\r" 76send -- "firejail --noprofile --private-home=~/.mozilla,~/.config/firejail\r"
77expect { 77expect {
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#**************************************************************
110send -- "firejail --private-home=~/.mozilla,~/.config/firejail\r" 110send -- "firejail --noprofile --private-home=~/.mozilla,~/.config/firejail\r"
111expect { 111expect {
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}
115sleep 1 115sleep 1
116 116
117send -- "ls -al\r" 117send -- "ls -al\r"
118expect { 118expect {
119 timeout {puts "TESTING ERROR 2.1\n";exit} 119 timeout {puts "TESTING ERROR 3.1\n";exit}
120 ".config" 120 ".config"
121} 121}
122expect { 122expect {
123 timeout {puts "TESTING ERROR 2.2\n";exit} 123 timeout {puts "TESTING ERROR 3.2\n";exit}
124 ".mozilla" 124 ".mozilla"
125} 125}
126sleep 1 126sleep 1
127 127
128send -- "find .config\r" 128send -- "find .config\r"
129expect { 129expect {
130 timeout {puts "TESTING ERROR 2.3\n";exit} 130 timeout {puts "TESTING ERROR 3.3\n";exit}
131 ".config" 131 ".config"
132} 132}
133expect { 133expect {
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}
137sleep 1 137sleep 1
@@ -140,31 +140,31 @@ send -- "exit\r"
140sleep 2 140sleep 2
141 141
142#************************************************************** 142#**************************************************************
143send -- "firejail --private-home=/home/netblue/.mozilla,/home/netblue/.config/firejail\r" 143send -- "firejail --noprofile --private-home=/home/netblue/.mozilla,/home/netblue/.config/firejail\r"
144expect { 144expect {
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}
148sleep 1 148sleep 1
149 149
150send -- "ls -al\r" 150send -- "ls -al\r"
151expect { 151expect {
152 timeout {puts "TESTING ERROR 3.1\n";exit} 152 timeout {puts "TESTING ERROR 4.1\n";exit}
153 ".config" 153 ".config"
154} 154}
155expect { 155expect {
156 timeout {puts "TESTING ERROR 3.2\n";exit} 156 timeout {puts "TESTING ERROR 4.2\n";exit}
157 ".mozilla" 157 ".mozilla"
158} 158}
159sleep 1 159sleep 1
160 160
161send -- "find .config\r" 161send -- "find .config\r"
162expect { 162expect {
163 timeout {puts "TESTING ERROR 3.3\n";exit} 163 timeout {puts "TESTING ERROR 4.3\n";exit}
164 ".config" 164 ".config"
165} 165}
166expect { 166expect {
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}
170sleep 1 170sleep 1
@@ -173,18 +173,20 @@ send -- "exit\r"
173sleep 2 173sleep 2
174 174
175#************************************************************** 175#**************************************************************
176send -- "firejail --private-home=/home/netblue/../netblue/.mozilla,/home/netblue/.config/firejail\r" 176send -- "firejail --noprofile --private-home=/home/netblue/../netblue/.mozilla,/home/netblue/.config/firejail\r"
177expect { 177expect {
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}
181sleep 1 181sleep 1
182 182
183#************************************************************** 183#**************************************************************
184send -- "firejail --private-home=/root\r" 184send -- "firejail --noprofile --private-home=/root\r"
185expect { 185expect {
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}
189sleep 1 189sleep 1
190 190
191puts "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"
84expect { 84expect {
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}
89expect { 91expect {
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}
93sleep 1 95sleep 1
94 96
95puts "\n" 97puts "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
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "firejail --seccomp\r" 7send -- "firejail --noprofile --seccomp\r"
8expect { 8expect {
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
21send -- "exit\r" 21send -- "exit\r"
22sleep 1 22sleep 1
23puts "\n" 23puts "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
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "firejail --seccomp\r" 7send -- "firejail --noprofile --seccomp\r"
8expect { 8expect {
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
32send -- "exit\r" 32send -- "exit\r"
33sleep 1 33sleep 1
34puts "\n" 34puts "all done\n"