-
Notifications
You must be signed in to change notification settings - Fork 144
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
Specific cap-add and cap-drop command #358
Conversation
935173f
to
590d32a
Compare
need rebase |
9f785cd
to
3c1bfc1
Compare
updated. |
cmd/oci-runtime-tool/generate.go
Outdated
@@ -77,7 +77,17 @@ var generateFlags = []cli.Flag{ | |||
cli.StringFlag{Name: "output", Usage: "output file (defaults to stdout)"}, | |||
cli.BoolFlag{Name: "privileged", Usage: "enable privileged container settings"}, | |||
cli.StringSliceFlag{Name: "process-cap-add", Usage: "add Linux capabilities"}, |
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.
process-cap-add, process-cap drop should be removed
generate/generate.go
Outdated
return err | ||
} | ||
|
||
g.initSpec() |
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.
should be g.initSpecProcessCapabilities()
man/oci-runtime-tool-generate.1.md
Outdated
@@ -277,9 +277,39 @@ read the configuration from `config.json`. | |||
**--process-cap-add**=[] | |||
Add Linux capabilities | |||
|
|||
**--process-cap-add-ambient**=[] |
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.
Don't forget to modify completion file
updated, PTAL. |
@Mashimiao @liangchenye @hqhq PTAL |
generate/generate.go
Outdated
// AddProcessCapability adds a process capability into g.spec.Process.Capabilities. | ||
func (g *Generator) AddProcessCapability(c string) error { | ||
// AddProcessAmbientCapability adds a process capability into g.spec.Process.Capabilities.Ambient. | ||
func (g *Generator) AddProcessAmbientCapability(c string) error { |
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.
As we did for other generator functions, function's name should be based on spec's item order. As setting value for g.spec.Process.Capabilities.Ambient, the name should be AddProcessCapabilitiesAmbient.
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.
Done.
ping @mrunalp @liangchenye @hqhq PTAL |
ping @liangchenye |
reping @opencontainers/runtime-tools-maintainers |
ping @liangchenye @mrunalp |
Signed-off-by: zhouhao <[email protected]>
Signed-off-by: zhouhao <[email protected]>
f0e5a5e
to
4f756fd
Compare
rebased @Mashimiao @hqhq @liangchenye @mrunalp PTAL |
The management of each field of the specific Capabilities.
Signed-off-by: zhouhao [email protected]