nspawn-bind-user: fix logging an error message

... in `write_membership()` function.

Log the actual error message returned from `chase_and_open()`.
This commit is contained in:
Siteshwar Vashisht authored and Yu Watanabe committed 2026-10-04 17:01:06 +09:00
1 parent 458c5ce35c
commit 513e4b9947
1 file changed
+1 -1
+1 -1
View File
@@ -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)