aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/sandbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/sandbox.c')
-rw-r--r--src/firejail/sandbox.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c
index 3d0d43965..ec3bc250e 100644
--- a/src/firejail/sandbox.c
+++ b/src/firejail/sandbox.c
@@ -1030,6 +1030,7 @@ int sandbox(void* sandbox_arg) {
1030 * 3. mount RUN_ETC_DIR at /etc 1030 * 3. mount RUN_ETC_DIR at /etc
1031 */ 1031 */
1032 timetrace_start(); 1032 timetrace_start();
1033 cfg.etc_private_keep = fs_etc_build(cfg.etc_private_keep);
1033 fs_private_dir_copy("/etc", RUN_ETC_DIR, cfg.etc_private_keep); 1034 fs_private_dir_copy("/etc", RUN_ETC_DIR, cfg.etc_private_keep);
1034 1035
1035 if (umount2("/etc/group", MNT_DETACH) == -1) 1036 if (umount2("/etc/group", MNT_DETACH) == -1)
@@ -1046,7 +1047,8 @@ int sandbox(void* sandbox_arg) {
1046 1047
1047 // openSUSE configuration is split between /etc and /usr/etc 1048 // openSUSE configuration is split between /etc and /usr/etc
1048 // process private-etc a second time 1049 // process private-etc a second time
1049 fs_private_dir_list("/usr/etc", RUN_USR_ETC_DIR, cfg.etc_private_keep); 1050 if (access("/usr/etc", F_OK) == 0)
1051 fs_private_dir_list("/usr/etc", RUN_USR_ETC_DIR, cfg.etc_private_keep);
1050 } 1052 }
1051 } 1053 }
1052 1054