aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.8.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/3.8.exp')
-rwxr-xr-xtest/features/3.8.exp87
1 files changed, 0 insertions, 87 deletions
diff --git a/test/features/3.8.exp b/test/features/3.8.exp
deleted file mode 100755
index 23adab634..000000000
--- a/test/features/3.8.exp
+++ /dev/null
@@ -1,87 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2023 Firejail Authors
4# License GPL v2
5#
6# private-bin
7#
8
9set timeout 10
10spawn $env(SHELL)
11match_max 100000
12set overlay [lindex $argv 0]
13set chroot [lindex $argv 1]
14
15#
16# N
17#
18send -- "firejail --noprofile --private-bin=bash,cat,cp,ls,wc\r"
19expect {
20 timeout {puts "TESTING ERROR 0\n";exit}
21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22}
23sleep 1
24
25send -- "ls -l /usr/bin | wc -l\r"
26expect {
27 timeout {puts "TESTING ERROR 1.1\n";exit}
28 "6"
29}
30
31
32after 100
33send -- "exit\r"
34sleep 1
35
36#
37# O
38#
39if { $overlay == "overlay" } {
40 send -- "firejail --noprofile --overlay --private-bin=bash,cat,cp,ls,wc\r"
41 expect {
42 timeout {puts "TESTING ERROR 2\n";exit}
43 "overlay option is not available" {puts "grsecurity\n"; exit}
44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
45 }
46 sleep 1
47
48 send -- "ls -l /usr/bin | wc -l\r"
49 expect {
50 timeout {puts "TESTING ERROR 3.1\n";exit}
51 "6"
52 }
53
54
55 after 100
56 send -- "exit\r"
57 sleep 1
58}
59
60#
61# C
62#
63if { $chroot == "chroot" } {
64 send -- "firejail --noprofile --chroot=/tmp/chroot --private-bin=bash,cat,cp,ls,wc\r"
65 expect {
66 timeout {puts "TESTING ERROR 4\n";exit}
67 "private-bin feature is disabled in chroot"
68 }
69 expect {
70 timeout {puts "TESTING ERROR 5\n";exit}
71 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
72 }
73 sleep 1
74
75 send -- "ls -l /usr/bin | wc -l\r"
76 expect {
77 timeout {puts "TESTING ERROR 6\n";exit}
78 "9"
79 }
80
81 after 100
82 send -- "exit\r"
83 sleep 1
84}
85
86
87puts "\nall done\n"