diff options
author | smitsohu <smitsohu@gmail.com> | 2021-09-25 16:20:38 +0200 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2021-09-25 16:25:18 +0200 |
commit | 8d36b8675c140f0ef2678171a2ae9d57149642be (patch) | |
tree | 064fa3247b9ea7b3c1583191a638e3d13eab9e35 | |
parent | private-lib: check firejail libraries as root user (#4576) (diff) | |
download | firejail-8d36b8675c140f0ef2678171a2ae9d57149642be.tar.gz firejail-8d36b8675c140f0ef2678171a2ae9d57149642be.tar.zst firejail-8d36b8675c140f0ef2678171a2ae9d57149642be.zip |
private-lib fixup
don't try to read /usr/bin/firejail if private-bin removed it
from the sandbox filesystem
-rw-r--r-- | src/firejail/fs_lib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/firejail/fs_lib.c b/src/firejail/fs_lib.c index 9d7a17cf3..848c186fa 100644 --- a/src/firejail/fs_lib.c +++ b/src/firejail/fs_lib.c | |||
@@ -195,6 +195,11 @@ void fslib_mount_libs(const char *full_path, unsigned user) { | |||
195 | assert(full_path); | 195 | assert(full_path); |
196 | // if library/executable does not exist or the user does not have read access to it | 196 | // if library/executable does not exist or the user does not have read access to it |
197 | // print a warning and exit the function. | 197 | // print a warning and exit the function. |
198 | if (access(full_path, F_OK)) { | ||
199 | if (arg_debug || arg_debug_private_lib) | ||
200 | printf("Cannot find %s, skipping...\n", full_path); | ||
201 | return; | ||
202 | } | ||
198 | if (user && access(full_path, R_OK)) { | 203 | if (user && access(full_path, R_OK)) { |
199 | if (arg_debug || arg_debug_private_lib) | 204 | if (arg_debug || arg_debug_private_lib) |
200 | printf("Cannot read %s, skipping...\n", full_path); | 205 | printf("Cannot read %s, skipping...\n", full_path); |