From 01194ad1e5f38e929cb7fbbbdc4ec0ee92b8b1f2 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Fri, 28 Aug 2015 10:34:38 -0400 Subject: testing default.profile --- test/fs_chroot.exp | 4 ++-- test/fs_overlay.exp | 4 ++-- test/name.exp | 4 ++-- test/noroot.exp | 8 ++++---- test/option-trace.exp | 14 +++++--------- test/private-keep.exp | 38 ++++++++++++++++++++------------------ test/private.exp | 6 ++++-- test/seccomp-ptrace.exp | 4 ++-- test/seccomp-su.exp | 4 ++-- 9 files changed, 43 insertions(+), 43 deletions(-) (limited to 'test') 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 spawn $env(SHELL) match_max 100000 -send -- "firejail --chroot=/tmp/chroot\r" +send -- "firejail --noprofile --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" @@ -50,5 +50,5 @@ expect { } sleep 1 -puts "\n" +puts "all done\n" 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 { "home" } -send -- "firejail --overlay\r" +send -- "firejail --noprofile --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} "Child process initialized" @@ -60,5 +60,5 @@ expect { sleep 1 -puts "\n" +puts "all done \n" 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 spawn $env(SHELL) match_max 100000 -send -- "firejail --name=baluba\r" +send -- "firejail --name=baluba --noprofile\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "Child process initialized" @@ -22,4 +22,4 @@ expect { } sleep 1 -puts "\n" +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 spawn $env(SHELL) match_max 100000 -send -- "firejail --debug --noroot --caps.drop=all --seccomp --cpu=0,1 --name=noroot-sandbox\r" +send -- "firejail --debug --noprofile --noroot --caps.drop=all --seccomp --cpu=0,1 --name=noroot-sandbox\r" expect { timeout {puts "TESTING ERROR 0.1\n";exit} "Child process initialized" @@ -75,7 +75,7 @@ send -- "exit\r" sleep 2 -send -- "firejail --noroot\r" +send -- "firejail --noroot --noprofile\r" expect { timeout {puts "TESTING ERROR 6\n";exit} "Child process initialized" @@ -96,7 +96,7 @@ puts "\n" send -- "exit\r" sleep 2 -send -- "firejail --name=test --noroot\r" +send -- "firejail --name=test --noroot --noprofile\r" expect { timeout {puts "TESTING ERROR 9\n";exit} "Child process initialized" @@ -121,4 +121,4 @@ expect { "effective uid is not 0, is sudo installed setuid root?" { puts "OK\n";} "sudo must be owned by uid 0 and have the setuid bit set" { puts "OK\n";} } -puts "\n" +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 spawn $env(SHELL) match_max 100000 -send -- "firejail --trace firefox --name=testing\r" +send -- "firejail --trace\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } expect { timeout {puts "TESTING ERROR 1\n";exit} - "command not found" {puts "\nTESTING: not tested, firefox not found\n"; exit} - "1:firefox:open" {puts "\n"} - "1:iceweasel:open" + "1:bash:open /dev/tty" } expect { timeout {puts "TESTING ERROR 2\n";exit} - "1:firefox:access" {puts "\n"} - "1:iceweasel:access" + "1:bash:fopen /etc/passwd" } expect { timeout {puts "TESTING ERROR 3\n";exit} - "1:firefox:connect" {puts "\n"} - "1:iceweasel:connect" + "1:bash:access /etc/terminfo/x/xterm" } sleep 1 -puts "\n" +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) match_max 100000 #************************************************************** -send -- "firejail --private-home=.mozilla,.config/firejail\r" +send -- "firejail --noprofile --private-home=.mozilla,.config/firejail\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" @@ -73,7 +73,7 @@ sleep 2 #************************************************************** -send -- "firejail --private-home=~/.mozilla,~/.config/firejail\r" +send -- "firejail --noprofile --private-home=~/.mozilla,~/.config/firejail\r" expect { timeout {puts "TESTING ERROR 2\n";exit} "Child process initialized" @@ -107,31 +107,31 @@ sleep 2 #************************************************************** -send -- "firejail --private-home=~/.mozilla,~/.config/firejail\r" +send -- "firejail --noprofile --private-home=~/.mozilla,~/.config/firejail\r" expect { - timeout {puts "TESTING ERROR 2\n";exit} + timeout {puts "TESTING ERROR 3\n";exit} "Child process initialized" } sleep 1 send -- "ls -al\r" expect { - timeout {puts "TESTING ERROR 2.1\n";exit} + timeout {puts "TESTING ERROR 3.1\n";exit} ".config" } expect { - timeout {puts "TESTING ERROR 2.2\n";exit} + timeout {puts "TESTING ERROR 3.2\n";exit} ".mozilla" } sleep 1 send -- "find .config\r" expect { - timeout {puts "TESTING ERROR 2.3\n";exit} + timeout {puts "TESTING ERROR 3.3\n";exit} ".config" } expect { - timeout {puts "TESTING ERROR 2.4\n";exit} + timeout {puts "TESTING ERROR 3.4\n";exit} ".config/firejail" } sleep 1 @@ -140,31 +140,31 @@ send -- "exit\r" sleep 2 #************************************************************** -send -- "firejail --private-home=/home/netblue/.mozilla,/home/netblue/.config/firejail\r" +send -- "firejail --noprofile --private-home=/home/netblue/.mozilla,/home/netblue/.config/firejail\r" expect { - timeout {puts "TESTING ERROR 3\n";exit} + timeout {puts "TESTING ERROR 4\n";exit} "Child process initialized" } sleep 1 send -- "ls -al\r" expect { - timeout {puts "TESTING ERROR 3.1\n";exit} + timeout {puts "TESTING ERROR 4.1\n";exit} ".config" } expect { - timeout {puts "TESTING ERROR 3.2\n";exit} + timeout {puts "TESTING ERROR 4.2\n";exit} ".mozilla" } sleep 1 send -- "find .config\r" expect { - timeout {puts "TESTING ERROR 3.3\n";exit} + timeout {puts "TESTING ERROR 4.3\n";exit} ".config" } expect { - timeout {puts "TESTING ERROR 3.4\n";exit} + timeout {puts "TESTING ERROR 4.4\n";exit} ".config/firejail" } sleep 1 @@ -173,18 +173,20 @@ send -- "exit\r" sleep 2 #************************************************************** -send -- "firejail --private-home=/home/netblue/../netblue/.mozilla,/home/netblue/.config/firejail\r" +send -- "firejail --noprofile --private-home=/home/netblue/../netblue/.mozilla,/home/netblue/.config/firejail\r" expect { - timeout {puts "TESTING ERROR 4\n";exit} + timeout {puts "TESTING ERROR 5\n";exit} "Error: invalid private-home list" } sleep 1 #************************************************************** -send -- "firejail --private-home=/root\r" +send -- "firejail --noprofile --private-home=/root\r" expect { - timeout {puts "TESTING ERROR 5\n";exit} + timeout {puts "TESTING ERROR 6\n";exit} "Error: only files or directories created by the current user are allowed" } sleep 1 +puts "all done\n" + 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" expect { timeout {puts "TESTING ERROR 2\n";exit} "root777" {puts "version 1\n";} - "root1777" {puts "version 2\n";} + "root1777" {puts "version 2\n";} + "nobody777" {puts "version 3\n";} + "nobody1777" {puts "version 4\n";} } expect { timeout {puts "TESTING ERROR 2.1\n";exit} @@ -92,4 +94,4 @@ expect { } sleep 1 -puts "\n" +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 spawn $env(SHELL) match_max 100000 -send -- "firejail --seccomp\r" +send -- "firejail --noprofile --seccomp\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" @@ -20,4 +20,4 @@ expect { send -- "exit\r" sleep 1 -puts "\n" +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 spawn $env(SHELL) match_max 100000 -send -- "firejail --seccomp\r" +send -- "firejail --noprofile --seccomp\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" @@ -31,4 +31,4 @@ expect { send -- "exit\r" sleep 1 -puts "\n" +puts "all done\n" -- cgit v1.2.3-70-g09d2