strip trailing whitespace from test/

parent f74b2a9d
......@@ -102,4 +102,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -90,4 +90,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -89,4 +89,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -17,4 +17,3 @@ echo "TESTING: AppImage file name (test/appimage/filename.exp)";
echo "TESTING: AppImage argsv1 (test/appimage/appimage-args.exp)"
./appimage-args.exp
......@@ -32,4 +32,3 @@ after 100
puts "\nall done\n"
......@@ -32,4 +32,3 @@ then
else
echo "TESTING SKIP: thunderbird not found"
fi
......@@ -88,4 +88,3 @@ send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
......@@ -83,4 +83,3 @@ send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
......@@ -83,4 +83,3 @@ send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
......@@ -22,7 +22,7 @@ then
echo "TESTING: xterm x11 xpra"
./xterm-xpra.exp
fi
which Xephyr
if [ "$?" -eq 0 ];
then
......@@ -85,4 +85,3 @@ then
else
echo "TESTING SKIP: thunderbird not found"
fi
......@@ -81,6 +81,5 @@ sleep 1
send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
puts "\nall done\n"
......@@ -88,4 +88,3 @@ send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
......@@ -83,4 +83,3 @@ send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
......@@ -83,4 +83,3 @@ send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
......@@ -45,4 +45,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -56,4 +56,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -83,4 +83,3 @@ send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
......@@ -83,4 +83,3 @@ send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
......@@ -95,4 +95,3 @@ send -- "firejail --shutdown=test\r"
sleep 3
puts "\nall done\n"
......@@ -177,4 +177,3 @@ then
else
echo "TESTING SKIP: wine not found"
fi
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -97,4 +97,3 @@ expect {
after 100
puts "\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\n"
......@@ -82,4 +82,3 @@ after 100
puts "\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -76,4 +76,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -30,4 +30,3 @@ expect {
}
puts "\nall done\n"
......@@ -81,4 +81,3 @@ expect {
after 100
puts "\n"
......@@ -25,5 +25,3 @@ echo "TESTING: 4. --output option"
./outrun.exp
rm out
rm out.*
......@@ -37,7 +37,7 @@ expect {
}
# todo: remove exit and fix it
exit
exit
expect {
timeout {puts "TESTING ERROR 3.3.1\n";exit}
......
......@@ -80,4 +80,3 @@ sleep 1
puts "all done\n"
......@@ -73,4 +73,3 @@ expect {
puts "\n"
......@@ -83,5 +83,3 @@ expect {
"home" {puts "regular user\n"}
"root" {puts "root user\n"}
}
......@@ -59,4 +59,3 @@ after 100
puts "all done\n"
......@@ -24,4 +24,3 @@ expect {
after 100
puts "all done\n"
......@@ -13,28 +13,28 @@ void die(char *msg) {
int main(int argc, char *argv[])
{
int i;
if (chdir("/") != 0)
die("chdir(/)");
if (mkdir("baz", 0777) != 0)
; //die("mkdir(baz)");
if (chroot("baz") != 0)
die("chroot(baz)");
for (i=0; i<50; i++) {
if (chdir("..") != 0)
die("chdir(..)");
}
if (chroot(".") != 0)
die("chroot(.)");
printf("Exploit seems to work. =)\n");
execl("/bin/bash", "bash", "-i", (char *)0);
die("exec bash");
exit(0);
}
......@@ -356,4 +356,3 @@ echo ${arr[12]}
echo ${arr[13]}
echo ${arr[14]}
echo ${arr[15]}
......@@ -6,7 +6,7 @@ ifconfig br0 10.10.20.1/29 up
iptables -t nat -A POSTROUTING -o eth0 -s 10.10.20.0/29 -j MASQUERADE
# port forwarding
# iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 10.10.20.2:80
brctl addbr br1
ifconfig br1 10.10.30.1/24 up
brctl addbr br2
......
......@@ -29,7 +29,7 @@ expect {
expect {
timeout {puts "TESTING ERROR 4\n";exit}
"ioctl"
}
}
expect {
timeout {puts "TESTING ERROR 5\n";exit}
"exit_group"
......@@ -38,4 +38,3 @@ after 100
puts "\nall done\n"
......@@ -33,4 +33,3 @@ send -- "exit\r"
after 100
puts "\n"
......@@ -39,4 +39,3 @@ send -- "exit\r"
after 100
puts "\n"
......@@ -116,4 +116,3 @@ echo "TESTING: rlimit errors (test/environment/rlimit-bad.exp)"
echo "TESTING: rlimit errors profile (test/environment/rlimit-bad-profile.exp)"
./rlimit-bad-profile.exp
......@@ -20,4 +20,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -29,4 +29,3 @@ send -- "exit\r"
after 100
puts "\nall done\n"
......@@ -25,4 +25,3 @@ after 100
puts "\nall done\n"
......@@ -22,4 +22,3 @@ send -- "exit\r"
after 100
puts "\nall done\n"
......@@ -121,4 +121,3 @@ send -- "exit\r"
after 100
puts "\nall done\n"
......@@ -18,4 +18,3 @@ expect {
after 100
puts "\nall done\n"
rlimit-sigpending 67asd56
\ No newline at end of file
rlimit-sigpending 67asd56
rlimit-fsize 1024
rlimit-nproc 1000
rlimit-nofile 500
rlimit-sigpending 200
\ No newline at end of file
rlimit-sigpending 200
......@@ -45,4 +45,3 @@ after 100
puts "\nall done\n"
......@@ -80,4 +80,3 @@ expect {
after 100
puts "\nall done\n"
......@@ -33,4 +33,3 @@ send -- "exit\r"
after 100
puts "\nall done\n"
......@@ -40,7 +40,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "ls -l /boot\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -61,7 +61,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "ls -l /boot\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......
......@@ -41,7 +41,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "ls -l /selinux\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -63,7 +63,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "ls -l /selinux\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......
......@@ -64,7 +64,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "cat /proc/mounts | grep proc --color=never\r"
expect {
timeout {puts "TESTING ERROR 3.1\n";exit}
......@@ -105,7 +105,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "cat /proc/mounts | grep proc --color=never\r"
expect {
timeout {puts "TESTING ERROR 5.1\n";exit}
......
......@@ -53,7 +53,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "ls -l /home | wc -l\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -86,7 +86,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "ls -l /home | wc -l\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......
......@@ -40,7 +40,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "ps aux | wc -l \r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -61,7 +61,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "ps aux | wc -l \r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......
......@@ -40,7 +40,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "ls -l /var/log/syslog | wc -l\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -61,7 +61,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "ls -l /var/log/syslog | wc -l\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......
......@@ -42,7 +42,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "ls -l /var/tmp/somefile | wc -l\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -63,7 +63,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "ls -l /var/tmp/somefile | wc -l\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......
......@@ -107,7 +107,7 @@ if { $overlay == "overlay" } {
"Permission denied"
}
after 100
send -- "exit\r"
sleep 1
}
......
......@@ -56,7 +56,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "hostname\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -93,7 +93,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "hostname\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......
......@@ -48,7 +48,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "dig google.com\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -77,7 +77,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "dig google.com\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......
......@@ -111,7 +111,7 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1
send -- "dig google.com\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -126,7 +126,7 @@ if { $overlay == "overlay" } {
"SERVER"
}
after 100
send -- "/sbin/ifconfig\r"
expect {
timeout {puts "TESTING ERROR 3.4\n";exit}
......@@ -145,17 +145,17 @@ if { $overlay == "overlay" } {
"UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
}
after 100
send -- "exit\r"
sleep 3
send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --overlay --dns=8.8.8.8 --dns=8.8.4.4\r"
expect {
timeout {puts "TESTING ERROR 2\n";exit}
"Child process initialized"
}
sleep 1
send -- "dig google.com\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
......@@ -170,7 +170,7 @@ if { $overlay == "overlay" } {
"SERVER"
}
after 100
send -- "/sbin/ifconfig\r"
expect {
timeout {puts "TESTING ERROR 3.4\n";exit}
......@@ -189,7 +189,7 @@ if { $overlay == "overlay" } {
"UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
}
after 100
send -- "exit\r"
sleep 3
}
......@@ -205,7 +205,7 @@ if { $chroot == "chroot" } {
"Child process initialized"
}
sleep 1
send -- "dig google.com\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......@@ -220,7 +220,7 @@ if { $chroot == "chroot" } {
"SERVER:"
}
after 100
send -- "/sbin/ifconfig\r"
expect {
timeout {puts "TESTING ERROR 5.4\n";exit}
......@@ -239,17 +239,17 @@ if { $chroot == "chroot" } {
"UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
}
after 100
send -- "exit\r"
sleep 3
send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r"
expect {
timeout {puts "TESTING ERROR 4\n";exit}
"Child process initialized"
}
sleep 1
send -- "dig google.com\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
......@@ -264,7 +264,7 @@ if { $chroot == "chroot" } {
"SERVER:"
}
after 100
send -- "/sbin/ifconfig\r"
expect {
timeout {puts "TESTING ERROR 5.4\n";exit}
......@@ -283,7 +283,7 @@ if { $chroot == "chroot" } {
"UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
}
after 100
send -- "exit\r"
sleep 1
}
......
......@@ -99,15 +99,15 @@ if { $overlay == "overlay" } {
"Child process initialized" {puts "normal system\n"}
}
sleep 1