From e2d39e549f47bf706bc5700331821b1e7a7eac56 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 31 Oct 2018 16:17:22 +0100 Subject: [PATCH] nspawn: add proper error message if setns() on network namespace fd fails Addresses: https://github.com/systemd/systemd/pull/10589#issuecomment-434670595 --- src/nspawn/nspawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.3