mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
virt: Use cache for VIRTUALIZATION_PROOT
Of course, the very moment after I merged #15426, I noticed something was off: everything works, but the cache isn't updated. 🙈
This commit is contained in:
parent
67551eac30
commit
9b4f3fa3ea
@ -485,8 +485,10 @@ int detect_container(void) {
|
||||
const char *pf = procfs_file_alloca(ptrace_pid, "comm");
|
||||
_cleanup_free_ char *ptrace_comm = NULL;
|
||||
r = read_one_line_file(pf, &ptrace_comm);
|
||||
if (r >= 0 && startswith(ptrace_comm, "proot"))
|
||||
return VIRTUALIZATION_PROOT;
|
||||
if (r >= 0 && startswith(ptrace_comm, "proot")) {
|
||||
r = VIRTUALIZATION_PROOT;
|
||||
goto finish;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user