1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-03 05:18:09 +03:00

nspawn: switch to read_virtual_file() for reading audit loginuid

This commit is contained in:
Lennart Poettering 2024-11-14 12:25:22 +01:00
parent 312cf91005
commit 5ceb38cb1e

View File

@ -2848,7 +2848,7 @@ static int reset_audit_loginuid(void) {
if (!arg_privileged)
return 0;
r = read_one_line_file("/proc/self/loginuid", &p);
r = read_virtual_file("/proc/self/loginuid", SIZE_MAX, &p, /* ret_size= */ NULL);
if (r == -ENOENT)
return 0;
if (r < 0)