1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-18 10:04:04 +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) if (!arg_privileged)
return 0; 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) if (r == -ENOENT)
return 0; return 0;
if (r < 0) if (r < 0)