mirror of
https://github.com/NixOS/nix.git
synced 2025-11-22 02:09:36 +01:00
Merge branch 'test-sandboxing' of https://github.com/matthewbauer/nix
This commit is contained in:
commit
e5b397b2c7
3 changed files with 31 additions and 4 deletions
|
|
@ -199,7 +199,10 @@ void chrootHelper(int argc, char * * argv)
|
|||
uid_t gid = getgid();
|
||||
|
||||
if (unshare(CLONE_NEWUSER | CLONE_NEWNS) == -1)
|
||||
throw SysError("setting up a private mount namespace");
|
||||
/* Try with just CLONE_NEWNS in case user namespaces are
|
||||
specifically disabled. */
|
||||
if (unshare(CLONE_NEWNS) == -1)
|
||||
throw SysError("setting up a private mount namespace");
|
||||
|
||||
/* Bind-mount realStoreDir on /nix/store. If the latter mount
|
||||
point doesn't already exists, we have to create a chroot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue