mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-24 06:02:28 -06:00
Merge pull request #198 from Duncaen/musl
use UTMP_FILE to check for its existence
This commit is contained in:
commit
407eb657f2
1 changed files with 2 additions and 4 deletions
|
|
@ -320,7 +320,7 @@ void fs_var_utmp(void) {
|
|||
|
||||
// extract utmp group id
|
||||
gid_t utmp_group = 0;
|
||||
if (stat("/var/run/utmp", &s) == 0)
|
||||
if (stat(UTMP_FILE, &s) == 0)
|
||||
utmp_group = s.st_gid;
|
||||
else {
|
||||
fprintf(stderr, "Warning: cannot find /var/run/utmp\n");
|
||||
|
|
@ -362,9 +362,7 @@ void fs_var_utmp(void) {
|
|||
// mount the new utmp file
|
||||
if (arg_debug)
|
||||
printf("Mount the new utmp file\n");
|
||||
if (mount(RUN_UTMP_FILE, "/var/run/utmp", NULL, MS_BIND|MS_REC, NULL) < 0)
|
||||
if (mount(RUN_UTMP_FILE, UTMP_FILE, NULL, MS_BIND|MS_REC, NULL) < 0)
|
||||
errExit("mount bind utmp");
|
||||
fs_logger("create /var/run/utmp");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue