1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-08 09:57:41 +03:00

nspawn: fix detection of missing /proc/self/loginuid

Running 'systemd-nspawn -D /srv/Fedora/' gave me this error:
 Failed to read /proc/self/loginuid: No such file or directory

 Container Fedora failed with error code 1.

This patch fixes the problem.
This commit is contained in:
Tero Roponen 2014-02-25 17:19:35 +02:00 committed by Lennart Poettering
parent cb6fa44cb5
commit 13e8ceb84e
Notes: Zbigniew Jędrzejewski-Szmek 2014-02-28 23:32:34 -05:00
Backport: bugfix

View File

@ -1349,7 +1349,7 @@ static int reset_audit_loginuid(void) {
return 0;
r = read_one_line_file("/proc/self/loginuid", &p);
if (r == -EEXIST)
if (r == -ENOENT)
return 0;
if (r < 0) {
log_error("Failed to read /proc/self/loginuid: %s", strerror(-r));