From f3a248d5d52357285ee1ae18c86c961d0667b2f8 Mon Sep 17 00:00:00 2001 From: startx2017 Date: Wed, 17 Oct 2018 19:13:16 -0400 Subject: mainline merge: fs_whitelist: no warning if macro resolution fails because of missing… MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/firejail/fs_whitelist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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) { new_name = expand_home(dataptr, cfg.homedir); assert(new_name); - // skip command if resolving the macro was not successful + // mount empty home directory if resolving the macro was not successful if (is_macro(new_name) && macro_id(new_name) > -1) { - // mount empty home directory and print a warning - if (!nowhitelist_flag && !arg_private) { + // no warning if home does not exist (e.g. in a chroot) + if (stat(cfg.homedir, &s) == 0 && !nowhitelist_flag && !arg_private) { home_dir = 1; if (!arg_quiet) { fprintf(stderr, "***\n"); -- cgit v1.2.3-70-g09d2