diff options
author | 2018-09-26 09:50:10 -0400 | |
---|---|---|
committer | 2018-09-26 09:50:10 -0400 | |
commit | da25f89b03aba08ca6148ce2f865d4a84540404c (patch) | |
tree | 3eef85b25518742cc50b55ac50fca7b72e25d343 | |
parent | mainline merge: error strings (diff) | |
download | firejail-da25f89b03aba08ca6148ce2f865d4a84540404c.tar.gz firejail-da25f89b03aba08ca6148ce2f865d4a84540404c.tar.zst firejail-da25f89b03aba08ca6148ce2f865d4a84540404c.zip |
mailine merge: Fix check for nobody user, tests: skip tests checking for /dev/kmsg which might not be available
-rw-r--r-- | src/lib/firejail_user.c | 2 | ||||
-rwxr-xr-x | test/fs/fs.sh | 7 | ||||
-rwxr-xr-x | test/utils/fs-print.exp | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/firejail_user.c b/src/lib/firejail_user.c index b0f56a19a..b270db459 100644 --- a/src/lib/firejail_user.c +++ b/src/lib/firejail_user.c | |||
@@ -108,7 +108,7 @@ int firejail_user_check(const char *name) { | |||
108 | return 1; | 108 | return 1; |
109 | 109 | ||
110 | // user nobody is never allowed | 110 | // user nobody is never allowed |
111 | if (strcmp(name, "root") == 0) | 111 | if (strcmp(name, "nobody") == 0) |
112 | return 0; | 112 | return 0; |
113 | 113 | ||
114 | // check file existence | 114 | // check file existence |
diff --git a/test/fs/fs.sh b/test/fs/fs.sh index b4d2cf9c2..28c7338e3 100755 --- a/test/fs/fs.sh +++ b/test/fs/fs.sh | |||
@@ -23,7 +23,12 @@ echo "TESTING: /sys/fs access (test/fs/sys_fs.exp)" | |||
23 | ./sys_fs.exp | 23 | ./sys_fs.exp |
24 | 24 | ||
25 | echo "TESTING: kmsg access (test/fs/kmsg.exp)" | 25 | echo "TESTING: kmsg access (test/fs/kmsg.exp)" |
26 | ./kmsg.exp | 26 | if [ -c /dev/kmsg ]; then |
27 | echo "TESTING: kmsg access (test/fs/kmsg.exp)" | ||
28 | ./kmsg.exp | ||
29 | else | ||
30 | echo "TESTING SKIP: /dev/kmsg not available" | ||
31 | fi | ||
27 | 32 | ||
28 | echo "TESTING: read/write /var/tmp (test/fs/fs_var_tmp.exp)" | 33 | echo "TESTING: read/write /var/tmp (test/fs/fs_var_tmp.exp)" |
29 | ./fs_var_tmp.exp | 34 | ./fs_var_tmp.exp |
diff --git a/test/utils/fs-print.exp b/test/utils/fs-print.exp index 450945b66..21f6f68ff 100755 --- a/test/utils/fs-print.exp +++ b/test/utils/fs-print.exp | |||
@@ -22,11 +22,11 @@ expect { | |||
22 | } | 22 | } |
23 | expect { | 23 | expect { |
24 | timeout {puts "TESTING ERROR 2\n";exit} | 24 | timeout {puts "TESTING ERROR 2\n";exit} |
25 | "blacklist /dev/kmsg" | 25 | "blacklist /proc/kmsg" |
26 | } | 26 | } |
27 | expect { | 27 | expect { |
28 | timeout {puts "TESTING ERROR 3\n";exit} | 28 | timeout {puts "TESTING ERROR 3\n";exit} |
29 | "blacklist /proc/kmsg" | 29 | "blacklist /bin/su" |
30 | } | 30 | } |
31 | after 100 | 31 | after 100 |
32 | puts "\nall done\n" | 32 | puts "\nall done\n" |