summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2018-10-12 20:05:10 +0200
committerLibravatar smitsohu <smitsohu@gmail.com>2018-10-12 20:05:10 +0200
commitefcfdaae0e6e687d32ccd0440fbcc383398ffb81 (patch)
treec33482254fe9db4fb2ed067f6cab4a031416a281 /src
parentconsolidate cloud blacklisting, alphabetize, other nitpicks (diff)
downloadfirejail-efcfdaae0e6e687d32ccd0440fbcc383398ffb81.tar.gz
firejail-efcfdaae0e6e687d32ccd0440fbcc383398ffb81.tar.zst
firejail-efcfdaae0e6e687d32ccd0440fbcc383398ffb81.zip
fs_whitelist: no warning if macro resolution fails because of missing homedir
Diffstat (limited to 'src')
-rw-r--r--src/firejail/fs_whitelist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/firejail/fs_whitelist.c b/src/firejail/fs_whitelist.c
index 6dd4a7e2d..454715a71 100644
--- a/src/firejail/fs_whitelist.c
+++ b/src/firejail/fs_whitelist.c
@@ -371,10 +371,10 @@ void fs_whitelist(void) {
371 new_name = expand_home(dataptr, cfg.homedir); 371 new_name = expand_home(dataptr, cfg.homedir);
372 assert(new_name); 372 assert(new_name);
373 373
374 // skip command if resolving the macro was not successful 374 // mount empty home directory if resolving the macro was not successful
375 if (is_macro(new_name) && macro_id(new_name) > -1) { 375 if (is_macro(new_name) && macro_id(new_name) > -1) {
376 // mount empty home directory and print a warning 376 // no warning if home does not exist (e.g. in a chroot)
377 if (!nowhitelist_flag && !arg_private) { 377 if (stat(cfg.homedir, &s) == 0 && !nowhitelist_flag && !arg_private) {
378 home_dir = 1; 378 home_dir = 1;
379 if (!arg_quiet) { 379 if (!arg_quiet) {
380 fprintf(stderr, "***\n"); 380 fprintf(stderr, "***\n");