aboutsummaryrefslogtreecommitdiffstats
path: root/test/profiles/profile_followlnk.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/profiles/profile_followlnk.exp')
-rwxr-xr-xtest/profiles/profile_followlnk.exp37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/profiles/profile_followlnk.exp b/test/profiles/profile_followlnk.exp
new file mode 100755
index 000000000..4d89de26b
--- /dev/null
+++ b/test/profiles/profile_followlnk.exp
@@ -0,0 +1,37 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "mkdir /tmp/firejailtestdir\r"
8send -- "ln -s /tmp/firejailtestdir /tmp/firejailtestdirlnk\r"
9send -- "touch /tmp/firejailtestfile\r"
10send -- "ln -s /tmp/firejailtestfile /tmp/firejailtestfilelnk\r"
11sleep 1
12
13send -- "firejail --profile=readonly-lnk.profile\r"
14expect {
15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized"
17}
18
19send -- "ls > /tmp/firejailtestdirlnk/ttt\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Read-only file system"
23}
24sleep 1
25
26send -- "ls > /tmp/firejailtestfilelnk;pwd\r"
27expect {
28 timeout {puts "TESTING ERROR 2\n";exit}
29 "Read-only file system"
30}
31sleep 1
32
33send -- "exit\r"
34send -- "rm -fr /tmp/firejailtest*\r"
35sleep 1
36
37puts "\nall done\n"