summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-11-22 16:07:26 +0100
committerGitHub <noreply@github.com>2019-11-22 16:07:26 +0100
commit22e7d7d86f945620bbc1bdd3aa9c4a9d3248fa1f (patch)
treeda7059e10b4403d615eb2cdb1d96b83db9597919 /libpod
parent63924775ba221172874df7a1d992a76c25b9af38 (diff)
parent368d2ecfb6ee618803542fab823b428712aff083 (diff)
downloadpodman-22e7d7d86f945620bbc1bdd3aa9c4a9d3248fa1f.tar.gz
podman-22e7d7d86f945620bbc1bdd3aa9c4a9d3248fa1f.tar.bz2
podman-22e7d7d86f945620bbc1bdd3aa9c4a9d3248fa1f.zip
Merge pull request #4525 from rst0git/uns-restore-fix
container-restore: Fix restore with user namespace
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal_linux.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 26d6771b0..2ecd5911a 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -884,7 +884,12 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti
// We want to have the same network namespace as before.
if c.config.CreateNetNS {
- if err := g.AddOrReplaceLinuxNamespace(string(spec.NetworkNamespace), c.state.NetNS.Path()); err != nil {
+ netNSPath := ""
+ if !c.config.PostConfigureNetNS {
+ netNSPath = c.state.NetNS.Path()
+ }
+
+ if err := g.AddOrReplaceLinuxNamespace(string(spec.NetworkNamespace), netNSPath); err != nil {
return err
}
}