diff options
author | 2019-07-16 11:12:31 +0200 | |
---|---|---|
committer | 2019-07-16 11:12:31 +0200 | |
commit | f7ab8caf3f712ad277948b2159e0fcd251d747e4 (patch) | |
tree | d9f6f7eb8d400937bc10f62268b6384451364168 | |
parent | profile support for allow-debuggers (#2856) (diff) | |
download | firejail-f7ab8caf3f712ad277948b2159e0fcd251d747e4.tar.gz firejail-f7ab8caf3f712ad277948b2159e0fcd251d747e4.tar.zst firejail-f7ab8caf3f712ad277948b2159e0fcd251d747e4.zip |
check for dir existence before private-* mount
fixes #2859
-rw-r--r-- | src/firejail/fs_etc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/firejail/fs_etc.c b/src/firejail/fs_etc.c index 228df4399..eb03eb35f 100644 --- a/src/firejail/fs_etc.c +++ b/src/firejail/fs_etc.c | |||
@@ -141,6 +141,13 @@ void fs_private_dir_list(const char *private_dir, const char *private_run_dir, c | |||
141 | assert(private_dir); | 141 | assert(private_dir); |
142 | assert(private_run_dir); | 142 | assert(private_run_dir); |
143 | assert(private_list); | 143 | assert(private_list); |
144 | |||
145 | // nothing to do if directory does not exist | ||
146 | struct stat s; | ||
147 | if (stat(private_dir, &s) == -1) { | ||
148 | fmessage("Cannot find %s\n", private_dir); | ||
149 | return; | ||
150 | } | ||
144 | 151 | ||
145 | timetrace_start(); | 152 | timetrace_start(); |
146 | 153 | ||