chiark / gitweb /
nspawn: fix detection of missing /proc/self/loginuid
authorTero Roponen <tero.roponen@gmail.com>
Tue, 25 Feb 2014 15:19:35 +0000 (17:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 28 Feb 2014 11:58:02 +0000 (12:58 +0100)
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.

src/nspawn/nspawn.c

index 1fe641b..92b6728 100644 (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));