summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorAdrian Reber <areber@redhat.com>2021-06-10 09:51:57 +0000
committerMatthew Heon <mheon@redhat.com>2021-06-24 14:11:59 -0400
commita9fd54775d1d854bfa1c0ecf01c2821a35ef78ce (patch)
tree90741f5c9419342006217e112cd2686e4aa7504e /libpod
parentd5f0729b23eed2753ed3d49394030a9163c0f4db (diff)
downloadpodman-a9fd54775d1d854bfa1c0ecf01c2821a35ef78ce.tar.gz
podman-a9fd54775d1d854bfa1c0ecf01c2821a35ef78ce.tar.bz2
podman-a9fd54775d1d854bfa1c0ecf01c2821a35ef78ce.zip
Fix restoring of privileged containers
Checkpointed containers started with --privileged fail during restore with: Error: error creating container storage: ProcessLabel and Mountlabel must either not be specified or both specified This commit fixes it by not setting the labels when restoring a privileged container. [NO TESTS NEEDED] Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 6cc484493..f79edfbca 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -427,7 +427,7 @@ func (c *Container) setupStorage(ctx context.Context) error {
},
LabelOpts: c.config.LabelOpts,
}
- if c.restoreFromCheckpoint {
+ if c.restoreFromCheckpoint && !c.config.Privileged {
// If restoring from a checkpoint, the root file-system
// needs to be mounted with the same SELinux labels as
// it was mounted previously.