From 3e069f1c2344c1b40c1cfd22912b3517c8abff9e Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Sat, 3 Oct 2026 15:13:50 +0200 Subject: [PATCH] nspawn-bind-user: fix logging an error message ... in `write_membership()` function. Log the actual error message returned from `chase_and_open()`. (cherry picked from commit 513e4b9947c619e2ecfe79c0e81d6461dc65480c) --- src/nspawn/nspawn-bind-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nspawn/nspawn-bind-user.c b/src/nspawn/nspawn-bind-user.c index 0211cfe23c..4d41847f7a 100644 --- a/src/nspawn/nspawn-bind-user.c +++ b/src/nspawn/nspawn-bind-user.c @@ -92,7 +92,7 @@ static int write_membership(const char *root, const char *user, const char *grou O_WRONLY|O_CREAT|O_CLOEXEC, /* ret_path= */ NULL); if (fd < 0) - return log_error_errno(errno, "Failed to create %s: %m", p); + return log_error_errno(fd, "Failed to create %s: %m", p); r = userns_chown_at(fd, /* fname= */ NULL, /* uid= */ 0, /* gid= */ 0, /* flags= */ 0); if (r < 0)