aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/private-etc.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs/private-etc.exp')
-rwxr-xr-xtest/fs/private-etc.exp69
1 files changed, 0 insertions, 69 deletions
diff --git a/test/fs/private-etc.exp b/test/fs/private-etc.exp
deleted file mode 100755
index f51fc5221..000000000
--- a/test/fs/private-etc.exp
+++ /dev/null
@@ -1,69 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10# directory with ~
11send -- "firejail --private-etc=passwd,group,resolv.conf,X11\r"
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15}
16sleep 1
17
18send -- "LC_ALL=C ls -al /etc\r"
19expect {
20 timeout {puts "TESTING ERROR 3\n";exit}
21 "X11"
22}
23expect {
24 timeout {puts "TESTING ERROR 4\n";exit}
25 "group"
26}
27expect {
28 timeout {puts "TESTING ERROR 5\n";exit}
29 "passwd"
30}
31expect {
32 timeout {puts "TESTING ERROR 6\n";exit}
33 "resolv.conf"
34}
35
36
37send -- "file /etc/shadow\r"
38expect {
39 timeout {puts "TESTING ERROR 7\n";exit}
40 "No such file or directory"
41}
42after 100
43send -- "exit\r"
44sleep 1
45
46send -- "firejail --private-etc=shadow\r"
47expect {
48 timeout {puts "TESTING ERROR 8\n";exit}
49 "invalid file type"
50}
51after 100
52
53send -- "firejail --private-etc=\"bla;bla\"\r"
54expect {
55 timeout {puts "TESTING ERROR 9\n";exit}
56 "is an invalid filename"
57}
58after 100
59
60send -- "firejail --private-etc=../bin/ls\r"
61expect {
62 timeout {puts "TESTING ERROR 10\n";exit}
63 "is an invalid filename"
64}
65after 100
66
67send -- "exit\r"
68after 100
69puts "\nall done\n"