diff options
Diffstat (limited to 'src/firejail/fs_var.c')
-rw-r--r-- | src/firejail/fs_var.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/firejail/fs_var.c b/src/firejail/fs_var.c index 372765cd4..377ce8ff3 100644 --- a/src/firejail/fs_var.c +++ b/src/firejail/fs_var.c | |||
@@ -320,7 +320,7 @@ void fs_var_utmp(void) { | |||
320 | 320 | ||
321 | // extract utmp group id | 321 | // extract utmp group id |
322 | gid_t utmp_group = 0; | 322 | gid_t utmp_group = 0; |
323 | if (stat("/var/run/utmp", &s) == 0) | 323 | if (stat(UTMP_FILE, &s) == 0) |
324 | utmp_group = s.st_gid; | 324 | utmp_group = s.st_gid; |
325 | else { | 325 | else { |
326 | fprintf(stderr, "Warning: cannot find /var/run/utmp\n"); | 326 | fprintf(stderr, "Warning: cannot find /var/run/utmp\n"); |
@@ -362,9 +362,7 @@ void fs_var_utmp(void) { | |||
362 | // mount the new utmp file | 362 | // mount the new utmp file |
363 | if (arg_debug) | 363 | if (arg_debug) |
364 | printf("Mount the new utmp file\n"); | 364 | printf("Mount the new utmp file\n"); |
365 | if (mount(RUN_UTMP_FILE, "/var/run/utmp", NULL, MS_BIND|MS_REC, NULL) < 0) | 365 | if (mount(RUN_UTMP_FILE, UTMP_FILE, NULL, MS_BIND|MS_REC, NULL) < 0) |
366 | errExit("mount bind utmp"); | 366 | errExit("mount bind utmp"); |
367 | fs_logger("create /var/run/utmp"); | 367 | fs_logger("create /var/run/utmp"); |
368 | } | 368 | } |
369 | |||
370 | |||