Skip to content
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

Support user namespaces being disabled #4121

Merged
merged 2 commits into from Oct 8, 2020
Merged

Support user namespaces being disabled #4121

merged 2 commits into from Oct 8, 2020

Conversation

edolstra
Copy link
Member

@edolstra edolstra commented Oct 7, 2020

If max_user_namespaces is set to 0 or if CLONE_NEWUSER fails, then don't run the build in a user namespace.

Fixes #4092, #3145.

If max_user_namespaces is set to 0, then don't run the build in a user
namespace.

Fixes #4092.
@Kloenk
Copy link
Member

Kloenk commented Oct 7, 2020

What will happen if some namespaceing is disabled while compiling the kernel? So running a kernel without full namespaceing support

This makes builds work inside nixos-enter.

Fixes #3145.
@edolstra
Copy link
Member Author

edolstra commented Oct 7, 2020

@Kloenk Probably in that case max_user_namespaces doesn't exist so it won't try to use a user namespace. However I now also handle the case where CLONE_NEWUSER fails.

@edolstra edolstra merged commit 54f4500 into master Oct 8, 2020
@edolstra edolstra deleted the no-user-namespace branch October 8, 2020 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when installing multi-user version of Nix
2 participants