-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
libct: fix user ns join order for rootful container #4491
base: main
Are you sure you want to change the base?
Conversation
I don't think this is the nicest solution for #4390. As I suggested, we should do what You don't need to move the joining to after I'm biased, but I think #4492 is cleaner. |
Really? I think there is no |
We don't do |
Ah, yes, it is not really necessary to do that. |
Signed-off-by: lifubang <[email protected]>
@cyphar As you described in #4492 (comment), we can just only need to adjust the ns type order for rootful container? I think it's more simple to do it in go code. Do you think this is enough to fix the issue? |
If we are rootless and there are userns-owned namespaces, we need to be in the userns in order to have the necessary permissions to do setns. This is what 2cd9c31 fixed. But for rootful container, if we join the userns in first step, we may can't join some namespaces which have no permissions for the userns we have joined. Signed-off-by: lifubang <[email protected]>
I test your test case in #4492 with this PR, it can work.
|
Is there agreement if we should pursue this PR or #4492? |
Fix: #4390
If we are rootless and there are userns-owned namespaces, we need to be in the
userns in order to have the necessary permissions to do setns. This is what
2cd9c31 fixed.
But for rootful container, if we join the userns in first step, we may can't
join some namespaces which have no permissions for the userns we have joined.
Signed-off-by: lifubang [email protected]