aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/fs_trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/fs_trace.c')
-rw-r--r--src/firejail/fs_trace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/firejail/fs_trace.c b/src/firejail/fs_trace.c
index 2b0f52a98..f4f5d3e81 100644
--- a/src/firejail/fs_trace.c
+++ b/src/firejail/fs_trace.c
@@ -53,20 +53,20 @@ void fs_trace(void) {
53 if (arg_debug) 53 if (arg_debug)
54 printf("Create the new ld.so.preload file\n"); 54 printf("Create the new ld.so.preload file\n");
55 55
56 FILE *fp = fopen(LDPRELOAD_FILE, "w"); 56 FILE *fp = fopen(RUN_LDPRELOAD_FILE, "w");
57 if (!fp) 57 if (!fp)
58 errExit("fopen"); 58 errExit("fopen");
59 fprintf(fp, "%s/firejail/libtrace.so\n", LIBDIR); 59 fprintf(fp, "%s/firejail/libtrace.so\n", LIBDIR);
60 fclose(fp); 60 fclose(fp);
61 if (chown(LDPRELOAD_FILE, 0, 0) < 0) 61 if (chown(RUN_LDPRELOAD_FILE, 0, 0) < 0)
62 errExit("chown"); 62 errExit("chown");
63 if (chmod(LDPRELOAD_FILE, S_IRUSR | S_IWRITE | S_IRGRP | S_IROTH ) < 0) 63 if (chmod(RUN_LDPRELOAD_FILE, S_IRUSR | S_IWRITE | S_IRGRP | S_IROTH ) < 0)
64 errExit("chmod"); 64 errExit("chmod");
65 65
66 // mount the new preload file 66 // mount the new preload file
67 if (arg_debug) 67 if (arg_debug)
68 printf("Mount the new ld.so.preload file\n"); 68 printf("Mount the new ld.so.preload file\n");
69 if (mount(LDPRELOAD_FILE, "/etc/ld.so.preload", NULL, MS_BIND|MS_REC, NULL) < 0) 69 if (mount(RUN_LDPRELOAD_FILE, "/etc/ld.so.preload", NULL, MS_BIND|MS_REC, NULL) < 0)
70 errExit("mount bind ls.so.preload"); 70 errExit("mount bind ls.so.preload");
71} 71}
72 72