diff options
-rw-r--r-- | src/firejail/preproc.c | 4 | ||||
-rw-r--r-- | src/firejail/sandbox.c | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/firejail/preproc.c b/src/firejail/preproc.c index a7af4b127..a2dea0339 100644 --- a/src/firejail/preproc.c +++ b/src/firejail/preproc.c | |||
@@ -85,6 +85,10 @@ void preproc_mount_mnt_dir(void) { | |||
85 | tmpfs_mounted = 1; | 85 | tmpfs_mounted = 1; |
86 | fs_logger2("tmpfs", RUN_MNT_DIR); | 86 | fs_logger2("tmpfs", RUN_MNT_DIR); |
87 | 87 | ||
88 | // open and mount trace file while there are no user-writable files in RUN_MNT_DIR | ||
89 | if (arg_tracefile) | ||
90 | fs_tracefile(); | ||
91 | |||
88 | #ifdef HAVE_SECCOMP | 92 | #ifdef HAVE_SECCOMP |
89 | create_empty_dir_as_root(RUN_SECCOMP_DIR, 0755); | 93 | create_empty_dir_as_root(RUN_SECCOMP_DIR, 0755); |
90 | 94 | ||
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index 51c531159..288726d22 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c | |||
@@ -800,11 +800,8 @@ int sandbox(void* sandbox_arg) { | |||
800 | } | 800 | } |
801 | 801 | ||
802 | // trace pre-install | 802 | // trace pre-install |
803 | if (need_preload) { | 803 | if (need_preload) |
804 | fs_trace_preload(); | 804 | fs_trace_preload(); |
805 | if (arg_tracefile && !cfg.chrootdir) | ||
806 | fs_tracefile(); | ||
807 | } | ||
808 | 805 | ||
809 | // store hosts file | 806 | // store hosts file |
810 | if (cfg.hosts_file) | 807 | if (cfg.hosts_file) |
@@ -820,11 +817,8 @@ int sandbox(void* sandbox_arg) { | |||
820 | //**************************** | 817 | //**************************** |
821 | // trace pre-install, this time inside chroot | 818 | // trace pre-install, this time inside chroot |
822 | //**************************** | 819 | //**************************** |
823 | if (need_preload) { | 820 | if (need_preload) |
824 | fs_trace_preload(); | 821 | fs_trace_preload(); |
825 | if (arg_tracefile) | ||
826 | fs_tracefile(); | ||
827 | } | ||
828 | } | 822 | } |
829 | else | 823 | else |
830 | #endif | 824 | #endif |