From: Lennart Poettering Date: Wed, 31 Oct 2018 15:17:22 +0000 (+0100) Subject: nspawn: add proper error message if setns() on network namespace fd fails X-Git-Tag: v240~429 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2d39e549f47bf706bc5700331821b1e7a7eac56;p=thirdparty%2Fsystemd.git nspawn: add proper error message if setns() on network namespace fd fails Addresses: https://github.com/systemd/systemd/pull/10589#issuecomment-434670595 --- diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index fb6b603040a..ee78b4fd1ca 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -3148,7 +3148,7 @@ static int outer_child( if (arg_network_namespace_path) { r = namespace_enter(-1, -1, netns_fd, -1, -1); if (r < 0) - return r; + return log_error_errno(r, "Failed to join network namespace: %m"); } r = inner_child(barrier, directory, secondary, kmsg_socket, rtnl_socket, fds);