1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

generate seccomp profile convert type

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
Jessica Frazelle 2016-02-18 00:06:07 -05:00
parent e51457eea8
commit ad600239bc
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
6 changed files with 961 additions and 961 deletions

View file

@ -72,7 +72,10 @@ func (d *Driver) createContainer(c *execdriver.Command, hooks execdriver.Hooks)
}
if c.SeccompProfile == "" {
container.Seccomp = seccomp.GetDefaultProfile()
container.Seccomp, err = seccomp.GetDefaultProfile()
if err != nil {
return nil, err
}
}
}
// add CAP_ prefix to all caps for new libcontainer update to match

File diff suppressed because it is too large Load diff

View file

@ -20,11 +20,8 @@ func main() {
}
f := filepath.Join(wd, "default.json")
// get the default profile
p := seccomp.GetDefaultProfile()
// write the default profile to the file
b, err := json.MarshalIndent(p, "", "\t")
b, err := json.MarshalIndent(seccomp.DefaultProfile, "", "\t")
if err != nil {
panic(err)
}

View file

@ -14,8 +14,8 @@ import (
//go:generate go run -tags 'seccomp' generate.go
// GetDefaultProfile returns the default seccomp profile.
func GetDefaultProfile() *configs.Seccomp {
return defaultProfile
func GetDefaultProfile() (*configs.Seccomp, error) {
return setupSeccomp(DefaultProfile)
}
// LoadProfile takes a file path a decodes the seccomp profile.

File diff suppressed because it is too large Load diff

View file

@ -2,9 +2,9 @@
package seccomp
import "github.com/opencontainers/runc/libcontainer/configs"
import "github.com/docker/engine-api/types"
var (
// defaultProfile is a nil pointer on unsupported systems.
defaultProfile *configs.Seccomp
// DefaultProfile is a nil pointer on unsupported systems.
DefaultProfile *types.Seccomp
)