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
Contributor

@Kloenk 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 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
4 checks passed
4 checks passed
tests (ubuntu-latest) tests (ubuntu-latest)
Details
tests (ubuntu-latest) tests (ubuntu-latest)
Details
tests (macos-latest) tests (macos-latest)
Details
tests (macos-latest) tests (macos-latest)
Details
@edolstra edolstra deleted the no-user-namespace branch Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.