From 50d4cd28682dccb7cdc8576327fcca65d848dff8 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 23 Jan 2018 17:12:13 +0100 Subject: Save --privileged state Signed-off-by: Daniel J Walsh Closes: #255 Approved by: mheon --- libpod/options.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libpod') 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 { -- cgit v1.2.3-54-g00ecf