diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2017-11-03 14:46:51 +0000 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-11-03 20:55:10 +0000 |
commit | 098389dc3e7bbba7c266ad24c909f3a5422e2908 (patch) | |
tree | 6b060ab5edc032bf63acb37489241b788c0f9381 /libpod/options.go | |
parent | 79a26cbd6dc5bff97726c4280db45362ddc83881 (diff) | |
download | podman-098389dc3e7bbba7c266ad24c909f3a5422e2908.tar.gz podman-098389dc3e7bbba7c266ad24c909f3a5422e2908.tar.bz2 podman-098389dc3e7bbba7c266ad24c909f3a5422e2908.zip |
Parse SecurityOpts
This should turn on handling of SELinux, NoNewPrivs, seccomp and Apparmor
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #15
Approved by: rhatdan
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 982655fc0..10cb605c2 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -255,6 +255,18 @@ func WithRootFSFromPath(path string) CtrCreateOption { } } +// WithSELinuxMountLabel sets the mount label for SELinux +func WithSELinuxMountLabel(mountLabel string) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return ErrCtrFinalized + } + + ctr.config.MountLabel = mountLabel + return nil + } +} + // WithRootFSFromImage sets up a fresh root filesystem using the given image // If useImageConfig is specified, image volumes, environment variables, and // other configuration from the image will be added to the config |