-
Notifications
You must be signed in to change notification settings - Fork 317
Conversation
602d6d9
to
1db5f8e
Compare
1db5f8e
to
3574a08
Compare
Compilation errors. |
@@ -0,0 +1,122 @@ | |||
// Go package that provides seccomp ( https://www.kernel.org/doc/Documentation/prctl/seccomp_filter.txt ) support for go. |
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 like Package seccomp ...
3574a08
to
eabb974
Compare
Action: configs.Action(syscall.EPERM), | ||
}) | ||
_, _, err = runContainer(config, "", "/bin/sh", "-c", "sleep 2") | ||
if err == nil { |
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.
Makes sense to check error text. We had test with just wrong cmd syntax for years in docker :)
ca85553
to
7cfe887
Compare
return true | ||
}() | ||
|
||
var edian edianSupport |
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.
typo: edian --> endian ?
super-cool 👍 |
7cfe887
to
1c65428
Compare
updated |
add seccomp feature which is not use third-party add multi arch surport add test case all code use golang this pr is relate to docker-archive#511 because I close it and find it can not be reopen Signed-off-by: Yang Shukui <[email protected]>
1. add args surport for seccomp 2. add CLONE_SECCOMP flag for preventing seccomp feature Signed-off-by: Yang Shukui <[email protected]>
Signed-off-by: Yang Shukui <[email protected]>
Signed-off-by: Michael Crosby <[email protected]> Conflicts: configs/config.go container_linux.go seccomp/seccomp.go seccomp/seccomp.test
1c65428
to
5edcda9
Compare
I tried with |
I am trying it now. Seems to work. We'll need to update doc and spec.md later. LGTM otherwise. |
Basic testing worked on Fedora 22 with busybox. |
@mrunalp How is it going here? Can we merge this? |
@LK4D4 yep. LGTM. |
This builds off of the work on @keloyang and @yangshukui in #529 and adds a pure Go package for using seccomp.
The changes in this PR are mostly around the package API and expressing constraints, all the hard work was done in the original commits, thanks!
This also adds security profile support for nsinit that uses seccomp for filtering. You can view the file
nsinit/security.go
in this PR to see how the seccomp package is consumed.