Fix pod sharing for utsmode

We should be sharing cgroups namespace by default in pods
uts namespace sharing was broken in pods.

Create a new libpod/pkg/namespaces for handling of namespace fields
in containers

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1418
Approved by: mheon
This commit is contained in:
Daniel J Walsh
2018-09-01 12:51:00 -04:00
committed by Atomic Bot
parent ccc4a339cd
commit 87f90ce14a
8 changed files with 269 additions and 175 deletions

View File

@ -6,6 +6,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"syscall"
. "github.com/onsi/ginkgo"
@ -153,6 +154,8 @@ var _ = Describe("Podman rootless", func() {
runRootlessHelper := func(args []string) {
f := func(rootlessTest PodmanTest, xdgRuntimeDir string, home string, mountPath string) {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
env := os.Environ()
env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir))
env = append(env, fmt.Sprintf("HOME=%s", home))