-
Notifications
You must be signed in to change notification settings - Fork 944
cli: support --privileged for exec #2531
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
Codecov Report
@@ Coverage Diff @@
## master #2531 +/- ##
==========================================
- Coverage 69.2% 69.05% -0.15%
==========================================
Files 278 278
Lines 18494 18494
==========================================
- Hits 12798 12771 -27
- Misses 4243 4258 +15
- Partials 1453 1465 +12
|
Signed-off-by: Ace-Tang <[email protected]>
|
How to add test case to check it works? |
|
The test is failed, /cc @rudyfly |
| AttachStdout: !e.Detach, | ||
| AttachStdin: !e.Detach && e.Interactive, | ||
| Privileged: false, | ||
| Privileged: e.Privileged, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is only client side change. And I didn't see that the daemon can use the field.
I think you should add the NoNewPrivileges here.
https://github.com/alibaba/pouch/blob/8abf067257260a1570ed0a09bff2b16df9a1b899/daemon/mgr/container_exec.go#L88-L98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two different things, NoNewPrivileges https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt , Privileged here related with container level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyway, LGTM. and wait for the CI.
|
closed by #2533 |
Signed-off-by: Ace-Tang [email protected]
Ⅰ. Describe what this PR did
support cli
pouch exec --privilegedⅡ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
no need
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews