]> git.ipfire.org Git - thirdparty/util-linux.git/commit
unshare: fix user namespace bind mounts
authorChris Webb <chris@arachsys.com>
Mon, 15 Dec 2025 18:48:29 +0000 (18:48 +0000)
committerChris Webb <chris@arachsys.com>
Mon, 15 Dec 2025 18:48:29 +0000 (18:48 +0000)
commit8f84322ecf618b9c84040e08e346341f2853a139
treeb72615bf5eb3b6ba072db52fa142ca01b4a3a3e8
parent35f142d33fbb758da7787f8040258b45f324b35e
unshare: fix user namespace bind mounts

unshare --user=<file> always fails because we no longer have CAP_SYS_ADMIN
in the parent user namespace after unsharing to create the new one. As with
unshare --mount=<file>, fork a child to make the bind mount instead.

Signed-off-by: Chris Webb <chris@arachsys.com>
sys-utils/unshare.c