summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-01-23 17:12:13 +0100
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-25 04:30:15 +0000
commit50d4cd28682dccb7cdc8576327fcca65d848dff8 (patch)
tree2547ec39fb02ddd6813a895b8dbcc03063ba6fdc /libpod/options.go
parent12e3d9d8a26d2c33d587dba9b7ea5b0dcfd92eea (diff)
downloadpodman-50d4cd28682dccb7cdc8576327fcca65d848dff8.tar.gz
podman-50d4cd28682dccb7cdc8576327fcca65d848dff8.tar.bz2
podman-50d4cd28682dccb7cdc8576327fcca65d848dff8.zip
Save --privileged state
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #255 Approved by: mheon
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index f82cb20c4..28962b4b5 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -268,6 +268,18 @@ func WithShmSize(size int64) CtrCreateOption {
}
}
+// WithPrivileged sets the privileged flag in the container runtime
+func WithPrivileged(privileged bool) CtrCreateOption {
+ return func(ctr *Container) error {
+ if ctr.valid {
+ return ErrCtrFinalized
+ }
+
+ ctr.config.Privileged = privileged
+ return nil
+ }
+}
+
// WithSELinuxLabels sets the mount label for SELinux
func WithSELinuxLabels(processLabel, mountLabel string) CtrCreateOption {
return func(ctr *Container) error {