diff options
author | netblue30 <netblue30@yahoo.com> | 2017-04-13 07:02:44 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2017-04-13 07:02:44 -0400 |
commit | 3813d1c47e6ac48b23c2a401e65b7a412f5de5f6 (patch) | |
tree | 3056838d37fceba7fdcff5f6158087fa4c603331 /test | |
parent | fix gimp profile (diff) | |
download | firejail-3813d1c47e6ac48b23c2a401e65b7a412f5de5f6.tar.gz firejail-3813d1c47e6ac48b23c2a401e65b7a412f5de5f6.tar.zst firejail-3813d1c47e6ac48b23c2a401e65b7a412f5de5f6.zip |
fix /sys handling for overlayfs and chroot
Diffstat (limited to 'test')
-rwxr-xr-x | test/chroot/configure | 2 | ||||
-rwxr-xr-x | test/chroot/fs_chroot.exp | 8 | ||||
-rwxr-xr-x | test/overlay/fs.exp | 8 |
3 files changed, 17 insertions, 1 deletions
diff --git a/test/chroot/configure b/test/chroot/configure index ba8238803..26a516931 100755 --- a/test/chroot/configure +++ b/test/chroot/configure | |||
@@ -8,7 +8,7 @@ DEFAULT_FILES+=`find /lib -name libnss*` # files required by glibc | |||
8 | DEFAULT_FILES+=" /bin/cp /bin/ls /bin/cat /bin/ps /bin/netstat /bin/ping /sbin/ifconfig /usr/bin/touch /bin/ip /bin/hostname /bin/grep /usr/bin/dig /usr/bin/openssl /usr/bin/id /usr/bin/getent /usr/bin/whoami /usr/bin/wc /usr/bin/wget /bin/umount" | 8 | DEFAULT_FILES+=" /bin/cp /bin/ls /bin/cat /bin/ps /bin/netstat /bin/ping /sbin/ifconfig /usr/bin/touch /bin/ip /bin/hostname /bin/grep /usr/bin/dig /usr/bin/openssl /usr/bin/id /usr/bin/getent /usr/bin/whoami /usr/bin/wc /usr/bin/wget /bin/umount" |
9 | 9 | ||
10 | rm -fr $ROOTDIR | 10 | rm -fr $ROOTDIR |
11 | mkdir -p $ROOTDIR/{root,bin,lib,lib64,usr,home,etc,dev/shm,tmp,var/run,var/tmp,var/lock,var/log,proc} | 11 | mkdir -p $ROOTDIR/{root,bin,lib,lib64,usr,home,etc,dev/shm,tmp,var/run,var/tmp,var/lock,var/log,proc,sys} |
12 | chmod 777 $ROOTDIR/tmp | 12 | chmod 777 $ROOTDIR/tmp |
13 | mkdir -p $ROOTDIR/etc/firejail | 13 | mkdir -p $ROOTDIR/etc/firejail |
14 | mkdir -p $ROOTDIR/home/netblue/.config/firejail | 14 | mkdir -p $ROOTDIR/home/netblue/.config/firejail |
diff --git a/test/chroot/fs_chroot.exp b/test/chroot/fs_chroot.exp index 295ff8ff9..2190db359 100755 --- a/test/chroot/fs_chroot.exp +++ b/test/chroot/fs_chroot.exp | |||
@@ -49,6 +49,14 @@ expect { | |||
49 | } | 49 | } |
50 | after 100 | 50 | after 100 |
51 | 51 | ||
52 | # check /sys directory | ||
53 | send -- "ls /sys\r" | ||
54 | expect { | ||
55 | timeout {puts "TESTING ERROR 6\n";exit} | ||
56 | "block" | ||
57 | } | ||
58 | after 100 | ||
59 | |||
52 | 60 | ||
53 | puts "all done\n" | 61 | puts "all done\n" |
54 | 62 | ||
diff --git a/test/overlay/fs.exp b/test/overlay/fs.exp index 15ada9203..15828f437 100755 --- a/test/overlay/fs.exp +++ b/test/overlay/fs.exp | |||
@@ -40,7 +40,15 @@ expect { | |||
40 | "xyzxyzxyz" {puts "TESTING ERROR 5.1\n";exit} | 40 | "xyzxyzxyz" {puts "TESTING ERROR 5.1\n";exit} |
41 | "done" | 41 | "done" |
42 | } | 42 | } |
43 | after 100 | ||
43 | 44 | ||
45 | # check /sys directory | ||
46 | send -- "ls /sys\r" | ||
47 | expect { | ||
48 | timeout {puts "TESTING ERROR 6\n";exit} | ||
49 | "block" | ||
50 | } | ||
44 | after 100 | 51 | after 100 |
52 | |||
45 | puts "\nall done\n" | 53 | puts "\nall done\n" |
46 | 54 | ||