diff options
author | Adrian Reber <areber@redhat.com> | 2021-06-10 09:51:57 +0000 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-06-24 14:11:59 -0400 |
commit | a9fd54775d1d854bfa1c0ecf01c2821a35ef78ce (patch) | |
tree | 90741f5c9419342006217e112cd2686e4aa7504e /libpod | |
parent | d5f0729b23eed2753ed3d49394030a9163c0f4db (diff) | |
download | podman-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.go | 2 |
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. |