forked from netblue30/firejail
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
netblue30
committed
Dec 19, 2016
1 parent
d94f357
commit 759dc6a
Showing
9 changed files
with
191 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
#!/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 --name=appimage-test --debug --appimage Leafpad-0.8.17-x86_64.AppImage testfile\r" | ||
expect { | ||
timeout {puts "TESTING ERROR 1\n";exit} | ||
"execvp argument 2" | ||
} | ||
expect { | ||
timeout {puts "TESTING ERROR 2\n";exit} | ||
"AppRun" | ||
} | ||
expect { | ||
timeout {puts "TESTING ERROR 3\n";exit} | ||
"testfile" | ||
} | ||
expect { | ||
timeout {puts "TESTING ERROR 4\n";exit} | ||
"Child process initialized" | ||
} | ||
sleep 2 | ||
|
||
spawn $env(SHELL) | ||
send -- "firejail --list\r" | ||
expect { | ||
timeout {puts "TESTING ERROR 5\n";exit} | ||
":firejail" | ||
} | ||
expect { | ||
timeout {puts "TESTING ERROR 6\n";exit} | ||
"appimage Leafpad" | ||
} | ||
after 100 | ||
|
||
# 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 7\n";exit} | ||
"Child process initialized" | ||
} | ||
sleep 2 | ||
|
||
spawn $env(SHELL) | ||
send -- "firemon --seccomp\r" | ||
expect { | ||
timeout {puts "TESTING ERROR 8\n";exit} | ||
"need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} | ||
"appimage Leafpad" | ||
} | ||
expect { | ||
timeout {puts "TESTING ERROR 9 (seccomp)\n";exit} | ||
"Seccomp: 2" | ||
} | ||
expect { | ||
timeout {puts "TESTING ERROR 10\n";exit} | ||
"name=blablabla" | ||
} | ||
after 100 | ||
send -- "firemon --caps\r" | ||
expect { | ||
timeout {puts "TESTING ERROR 11\n";exit} | ||
"appimage Leafpad" | ||
} | ||
expect { | ||
timeout {puts "TESTING ERROR 12\n";exit} | ||
"CapBnd:" | ||
} | ||
expect { | ||
timeout {puts "TESTING ERROR 13\n";exit} | ||
"0000000000000000" | ||
} | ||
expect { | ||
timeout {puts "TESTING ERROR 14\n";exit} | ||
"name=blablabla" | ||
} | ||
after 100 | ||
|
||
spawn $env(SHELL) | ||
send -- "firejail --shutdown=appimage-test\r" | ||
sleep 3 | ||
|
||
puts "\nall done\n" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters