]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
portablectl: fix swapped arguments for setns()
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 9 Apr 2026 16:11:33 +0000 (18:11 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 9 Apr 2026 19:43:42 +0000 (20:43 +0100)
Follow-up for 824fcb95c9e66abe6b350ebab6e0593498ff7aa1.

src/portable/portable.c

index bae23b1a5115e83acc073a289148b628dadead32..2a03c6f7ae6a8fd14d8ca7dc9ee30ea8a5b9c2dd 100644 (file)
@@ -524,7 +524,7 @@ static int portable_extract_by_path(
                                 seq[0] = safe_close(seq[0]);
                                 errno_pipe_fd[0] = safe_close(errno_pipe_fd[0]);
 
-                                if (setns(CLONE_NEWUSER, userns_fd) < 0) {
+                                if (setns(userns_fd, CLONE_NEWUSER) < 0) {
                                         r = log_debug_errno(errno, "Failed to join userns: %m");
                                         report_errno_and_exit(errno_pipe_fd[1], r);
                                 }