aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.6.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/3.6.exp')
-rwxr-xr-xtest/features/3.6.exp87
1 files changed, 0 insertions, 87 deletions
diff --git a/test/features/3.6.exp b/test/features/3.6.exp
deleted file mode 100755
index 5dcbdd483..000000000
--- a/test/features/3.6.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-etc
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-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\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 -al /etc | wc -l\r"
26expect {
27 timeout {puts "TESTING ERROR 1.1\n";exit}
28 "10"
29}
30
31after 100
32send -- "exit\r"
33sleep 1
34
35#
36# O
37#
38if { $overlay == "overlay" } {
39 send -- "firejail --noprofile --overlay --private-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\r"
40 expect {
41 timeout {puts "TESTING ERROR 2\n";exit}
42 "overlay option is not available" {puts "grsecurity\n"; exit}
43 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
44 }
45 sleep 1
46
47 send -- "ls -al /etc | wc -l\r"
48 expect {
49 timeout {puts "TESTING ERROR 3.1\n";exit}
50 "10"
51 }
52
53 after 100
54 send -- "exit\r"
55 sleep 1
56}
57
58#
59# C
60#
61if { $chroot == "chroot" } {
62 send -- "firejail --noprofile --chroot=/tmp/chroot --private-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\r"
63 expect {
64 timeout {puts "TESTING ERROR 4\n";exit}
65 "chroot option is not available" {puts "grsecurity\n"; exit}
66 "private-etc feature is disabled in chroot"
67 }
68 expect {
69 timeout {puts "TESTING ERROR 5\n";exit}
70 "chroot option is not available" {puts "grsecurity\n"; exit}
71 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
72 }
73 sleep 1
74
75 send -- "ls /etc | grep firejail\r"
76 expect {
77 timeout {puts "TESTING ERROR 6\n";exit}
78 "firejail"
79 }
80
81 after 100
82 send -- "exit\r"
83 sleep 1
84}
85
86
87puts "\nall done\n"