aboutsummaryrefslogtreecommitdiffstats
path: root/test/filters
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-10-21 10:14:08 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-10-21 10:14:08 -0400
commit08106743010d1b005e8d6cd377d79fdc8fb0af96 (patch)
tree2e9b5628ff35971597b2ce73760c136df86dcd20 /test/filters
parent0.9.44 testing (diff)
downloadfirejail-08106743010d1b005e8d6cd377d79fdc8fb0af96.tar.gz
firejail-08106743010d1b005e8d6cd377d79fdc8fb0af96.tar.zst
firejail-08106743010d1b005e8d6cd377d79fdc8fb0af96.zip
0.9.44 testing
Diffstat (limited to 'test/filters')
-rwxr-xr-xtest/filters/noroot.exp44
1 files changed, 22 insertions, 22 deletions
diff --git a/test/filters/noroot.exp b/test/filters/noroot.exp
index 2a7cb7975..b011f2bf9 100755
--- a/test/filters/noroot.exp
+++ b/test/filters/noroot.exp
@@ -46,20 +46,20 @@ expect {
46} 46}
47send -- "sudo -s\r" 47send -- "sudo -s\r"
48expect { 48expect {
49 timeout {puts "TESTING ERROR 8\n";exit} 49 timeout {puts "TESTING ERROR 7\n";exit}
50 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";} 50 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";}
51 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";} 51 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";}
52 "Bad system call" { puts "OK\n";} 52 "Bad system call" { puts "OK\n";}
53} 53}
54send -- "cat /proc/self/uid_map | wc -l\r" 54send -- "cat /proc/self/uid_map | wc -l\r"
55expect { 55expect {
56 timeout {puts "TESTING ERROR 7\n";exit} 56 timeout {puts "TESTING ERROR 8\n";exit}
57 "1" 57 "1"
58} 58}
59send -- "cat /proc/self/gid_map | wc -l\r" 59send -- "cat /proc/self/gid_map | wc -l\r"
60expect { 60expect {
61 timeout {puts "TESTING ERROR 8\n";exit} 61 timeout {puts "TESTING ERROR 9\n";exit}
62 "3" 62 "5"
63} 63}
64 64
65puts "\n" 65puts "\n"
@@ -70,59 +70,59 @@ sleep 2
70 70
71send -- "firejail --name=test --noroot --noprofile\r" 71send -- "firejail --name=test --noroot --noprofile\r"
72expect { 72expect {
73 timeout {puts "TESTING ERROR 9\n";exit} 73 timeout {puts "TESTING ERROR 10\n";exit}
74 "Child process initialized" 74 "Child process initialized"
75} 75}
76sleep 1 76sleep 1
77 77
78send -- "cat /proc/self/status\r" 78send -- "cat /proc/self/status\r"
79expect { 79expect {
80 timeout {puts "TESTING ERROR 10\n";exit} 80 timeout {puts "TESTING ERROR 11\n";exit}
81 "CapBnd:" 81 "CapBnd:"
82} 82}
83expect { 83expect {
84 timeout {puts "TESTING ERROR 11\n";exit} 84 timeout {puts "TESTING ERROR 12\n";exit}
85 "ffffffff" 85 "ffffffff"
86} 86}
87expect { 87expect {
88 timeout {puts "TESTING ERROR 12\n";exit} 88 timeout {puts "TESTING ERROR 13\n";exit}
89 "Seccomp:" 89 "Seccomp:"
90} 90}
91expect { 91expect {
92 timeout {puts "TESTING ERROR 13\n";exit} 92 timeout {puts "TESTING ERROR 14\n";exit}
93 "0" 93 "0"
94} 94}
95expect { 95expect {
96 timeout {puts "TESTING ERROR 14\n";exit} 96 timeout {puts "TESTING ERROR 15\n";exit}
97 "Cpus_allowed:" 97 "Cpus_allowed:"
98} 98}
99puts "\n" 99puts "\n"
100 100
101send -- "whoami\r" 101send -- "whoami\r"
102expect { 102expect {
103 timeout {puts "TESTING ERROR 15\n";exit} 103 timeout {puts "TESTING ERROR 16\n";exit}
104 $env(USER) 104 $env(USER)
105} 105}
106send -- "sudo -s\r" 106send -- "sudo -s\r"
107expect { 107expect {
108 timeout {puts "TESTING ERROR 16\n";exit} 108 timeout {puts "TESTING ERROR 17\n";exit}
109 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";} 109 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";}
110 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";} 110 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";}
111} 111}
112send -- "ping 0\r" 112send -- "ping 0\r"
113expect { 113expect {
114 timeout {puts "TESTING ERROR 17\n";exit} 114 timeout {puts "TESTING ERROR 18\n";exit}
115 "Operation not permitted" 115 "Operation not permitted"
116} 116}
117send -- "cat /proc/self/uid_map | wc -l\r" 117send -- "cat /proc/self/uid_map | wc -l\r"
118expect { 118expect {
119 timeout {puts "TESTING ERROR 18\n";exit} 119 timeout {puts "TESTING ERROR 19\n";exit}
120 "1" 120 "1"
121} 121}
122send -- "cat /proc/self/gid_map | wc -l\r" 122send -- "cat /proc/self/gid_map | wc -l\r"
123expect { 123expect {
124 timeout {puts "TESTING ERROR 19\n";exit} 124 timeout {puts "TESTING ERROR 20\n";exit}
125 "3" 125 "5"
126} 126}
127 127
128 128
@@ -130,31 +130,31 @@ expect {
130spawn $env(SHELL) 130spawn $env(SHELL)
131send -- "firejail --debug --join=test\r" 131send -- "firejail --debug --join=test\r"
132expect { 132expect {
133 timeout {puts "TESTING ERROR 20\n";exit} 133 timeout {puts "TESTING ERROR 21\n";exit}
134 "User namespace detected" 134 "User namespace detected"
135} 135}
136expect { 136expect {
137 timeout {puts "TESTING ERROR 21\n";exit} 137 timeout {puts "TESTING ERROR 22\n";exit}
138 "Joining user namespace" 138 "Joining user namespace"
139} 139}
140sleep 1 140sleep 1
141 141
142send -- "sudo -s\r" 142send -- "sudo -s\r"
143expect { 143expect {
144 timeout {puts "TESTING ERROR 22\n";exit} 144 timeout {puts "TESTING ERROR 23\n";exit}
145 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";} 145 "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";}
146 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";} 146 "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";}
147 "Permission denied" { puts "OK\n";} 147 "Permission denied" { puts "OK\n";}
148} 148}
149send -- "cat /proc/self/uid_map | wc -l\r" 149send -- "cat /proc/self/uid_map | wc -l\r"
150expect { 150expect {
151 timeout {puts "TESTING ERROR 23\n";exit} 151 timeout {puts "TESTING ERROR 24\n";exit}
152 "1" 152 "1"
153} 153}
154send -- "cat /proc/self/gid_map | wc -l\r" 154send -- "cat /proc/self/gid_map | wc -l\r"
155expect { 155expect {
156 timeout {puts "TESTING ERROR 24\n";exit} 156 timeout {puts "TESTING ERROR 25\n";exit}
157 "3" 157 "5"
158} 158}
159after 100 159after 100
160puts "\nall done\n" 160puts "\nall done\n"