From 0c2a5e31c626827ae84ccc4b04582081e5b10942 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Sat, 26 Jun 2021 17:25:14 +0200 Subject: tweaks --- src/firejail/fs_home.c | 2 +- src/firejail/fs_whitelist.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c index 1c4f9e07e..0ed476063 100644 --- a/src/firejail/fs_home.c +++ b/src/firejail/fs_home.c @@ -610,8 +610,8 @@ void fs_private_home_list(void) { EUID_ROOT(); if (bind_mount_path_to_fd(RUN_HOME_DIR, fd)) errExit("mount bind"); - close(fd); EUID_USER(); + close(fd); // check /proc/self/mountinfo to confirm the mount is ok MountData *mptr = get_last_mount(); diff --git a/src/firejail/fs_whitelist.c b/src/firejail/fs_whitelist.c index 7588f69b7..943f275de 100644 --- a/src/firejail/fs_whitelist.c +++ b/src/firejail/fs_whitelist.c @@ -375,9 +375,8 @@ static void tmpfs_topdirs(const TopDir *topdirs) { // user home directory if (tmpfs_home) { - // checks owner if outside /home EUID_USER(); - fs_private(); + fs_private(); // checks owner if outside /home EUID_ROOT(); } -- cgit v1.2.3-70-g09d2