aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/firejail/fs_var.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/firejail/fs_var.c b/src/firejail/fs_var.c
index b420d6448..bae3d6df0 100644
--- a/src/firejail/fs_var.c
+++ b/src/firejail/fs_var.c
@@ -295,7 +295,7 @@ void fs_var_utmp(void) {
295 printf("Create the new utmp file\n"); 295 printf("Create the new utmp file\n");
296 296
297 /* coverity[toctou] */ 297 /* coverity[toctou] */
298 FILE *fp = fopen(RUN_UTMP_FILE, "wxe"); 298 FILE *fp = fopen(RUN_UTMP_FILE, "we");
299 if (!fp) 299 if (!fp)
300 errExit("fopen"); 300 errExit("fopen");
301 301
@@ -322,5 +322,5 @@ void fs_var_utmp(void) {
322 printf("Mount the new utmp file\n"); 322 printf("Mount the new utmp file\n");
323 if (mount(RUN_UTMP_FILE, UTMP_FILE, NULL, MS_BIND|MS_NOSUID|MS_NOEXEC | MS_NODEV | MS_REC, NULL) < 0) 323 if (mount(RUN_UTMP_FILE, UTMP_FILE, NULL, MS_BIND|MS_NOSUID|MS_NOEXEC | MS_NODEV | MS_REC, NULL) < 0)
324 errExit("mount bind utmp"); 324 errExit("mount bind utmp");
325 fs_logger("create /var/run/utmp"); 325 fs_logger2("create", UTMP_FILE);
326} 326}