[Toybox] unshare/nsenter and flags

Rob Landley rob at landley.net
Sat May 11 08:47:34 PDT 2024


On 5/10/24 18:46, Yifan Hong wrote:
> I am running all commands as a non-root user. Here are the two commands I run:
> 
> strace ./toybox unshare --mount --map-root-user --user /bin/bash -c 'echo' 2>&1
> | tee /tmp/user.txt
> strace ./toybox unshare --mount --map-root-user /bin/bash -c 'echo' 2>&1 | tee
> /tmp/no_user.txt
> strace unshare --mount --map-root-user /bin/bash -c 'echo' 2>&1 | tee
> /tmp/no_user_linux.txt

$ unshare --mount --map-root-user --user /bin/bash -c echo
unshare: unshare failed: Operation not permitted

That's on my host devuan. Let's see about newer...

Ah, booting a daedalus ISO under KVM, the command works. Looks like they added
(enabled?) new kernel plumbing between 3.0 and 5.0.

>     Got about half my laptop tabs closed so far! Working towards a reboot...

Ok, time to bite the bullet and finish that, if I need the upgrade to test a fix...

Rob


More information about the Toybox mailing list