-
-
Notifications
You must be signed in to change notification settings - Fork 26
Use chroot over pivot_root #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9c0a864
to
e21605e
Compare
I mean only using |
I was unclear, I meant "only" |
At least with docker I get:
adding |
b0b7047
to
5b6278a
Compare
We only used pivot_root in order to temporarily bind /nix to the host and lift in different files. Now, we instead bind everything beforehand and finally do a simple chroot. Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
Yay, thanks 😄 |
We only used pivot_root in order to temporarily bind /nix to the host and lift in different files. Now, we instead bind everything beforehand and finally do a simple chroot.
As discussed in #22, I kept the
container.sh
script.You suggested only using the
CLONE_NEWUSER
flag in caseuid != 0
, however, that did not work for me. For me, that seemed to not clone the namespace at all (I know, right, wtf?) becausemount
listed the temporary directories we created. I got me a real scare when I realised thattempdir
would probably try to remove the files recursively, although I rebooted and my system doesn't appear to be harmed.Thus, this PR does not tackle the issue you perceived when the user was root. Sorry.