diff options
author | netblue30 <netblue30@yahoo.com> | 2016-05-03 08:41:24 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-05-03 08:41:24 -0400 |
commit | 57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc (patch) | |
tree | 60f90718665a1a812b552f589bc4d85616232df1 /test/profiles/profile_followlnk.exp | |
parent | Merge branch 'master' of https://github.com/netblue30/firejail (diff) | |
download | firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.gz firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.zst firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.zip |
networking features testing
Diffstat (limited to 'test/profiles/profile_followlnk.exp')
-rwxr-xr-x | test/profiles/profile_followlnk.exp | 37 |
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 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "mkdir /tmp/firejailtestdir\r" | ||
8 | send -- "ln -s /tmp/firejailtestdir /tmp/firejailtestdirlnk\r" | ||
9 | send -- "touch /tmp/firejailtestfile\r" | ||
10 | send -- "ln -s /tmp/firejailtestfile /tmp/firejailtestfilelnk\r" | ||
11 | sleep 1 | ||
12 | |||
13 | send -- "firejail --profile=readonly-lnk.profile\r" | ||
14 | expect { | ||
15 | timeout {puts "TESTING ERROR 0\n";exit} | ||
16 | "Child process initialized" | ||
17 | } | ||
18 | |||
19 | send -- "ls > /tmp/firejailtestdirlnk/ttt\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "Read-only file system" | ||
23 | } | ||
24 | sleep 1 | ||
25 | |||
26 | send -- "ls > /tmp/firejailtestfilelnk;pwd\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 2\n";exit} | ||
29 | "Read-only file system" | ||
30 | } | ||
31 | sleep 1 | ||
32 | |||
33 | send -- "exit\r" | ||
34 | send -- "rm -fr /tmp/firejailtest*\r" | ||
35 | sleep 1 | ||
36 | |||
37 | puts "\nall done\n" | ||