[systemd-devel] nspawn: fix detection of missing /proc/self/loginuid

Lennart Poettering lennart at poettering.net
Thu Feb 27 17:35:31 PST 2014


On Tue, 25.02.14 17:19, Tero Roponen (tero.roponen at gmail.com) wrote:

> 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.

Thanks!

Applied!

> 
> diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
> index 1a02935..e6f8ce7 100644
> --- a/src/nspawn/nspawn.c
> +++ b/src/nspawn/nspawn.c
> @@ -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));
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list