From ca592b90f11fff9737731c69d1e1e2439b6e3c44 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Fri, 10 Jun 2016 08:56:55 -0400 Subject: private-bin conversion --- test/apps/apps.sh | 9 ++++++ test/apps/filezilla.exp | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100755 test/apps/filezilla.exp (limited to 'test/apps') diff --git a/test/apps/apps.sh b/test/apps/apps.sh index 3ecc161a1..fa56ce370 100755 --- a/test/apps/apps.sh +++ b/test/apps/apps.sh @@ -69,6 +69,15 @@ else echo "TESTING SKIP: qbittorrent not found" fi +which filezilla +if [ "$?" -eq 0 ]; +then + echo "TESTING: filezilla" + ./filezilla.exp +else + echo "TESTING SKIP: filezilla not found" +fi + which evince if [ "$?" -eq 0 ]; then diff --git a/test/apps/filezilla.exp b/test/apps/filezilla.exp new file mode 100755 index 000000000..7f232f311 --- /dev/null +++ b/test/apps/filezilla.exp @@ -0,0 +1,83 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2016 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail filezilla\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Reading profile /etc/firejail/filezilla.profile" +} +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Child process initialized" +} +sleep 3 + +spawn $env(SHELL) +send -- "firejail --list\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 3.1\n";exit} + "filezilla" +} +sleep 1 + +# grsecurity exit +send -- "file /proc/sys/kernel/grsecurity\r" +expect { + timeout {puts "TESTING ERROR - grsecurity detection\n";exit} + "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} + "cannot open" {puts "grsecurity not present\n"} +} + +send -- "firejail --name=blablabla\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Child process initialized" +} +sleep 2 + +spawn $env(SHELL) +send -- "firemon --seccomp\r" +expect { + timeout {puts "TESTING ERROR 5\n";exit} + ":firejail filezilla" +} +expect { + timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} + "Seccomp: 2" +} +expect { + timeout {puts "TESTING ERROR 5.1\n";exit} + "name=blablabla" +} +sleep 1 +send -- "firemon --caps\r" +expect { + timeout {puts "TESTING ERROR 6\n";exit} + ":firejail filezilla" +} +expect { + timeout {puts "TESTING ERROR 6.1\n";exit} + "CapBnd:" +} +expect { + timeout {puts "TESTING ERROR 6.2\n";exit} + "0000000000000000" +} +expect { + timeout {puts "TESTING ERROR 6.3\n";exit} + "name=blablabla" +} +sleep 1 + +puts "\nall done\n" + -- cgit v1.2.3-54-g00ecf