mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
podman, userNS: configure an intermediate mount namespace
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #690 Approved by: mheon
This commit is contained in:

committed by
Atomic Bot

parent
73078fabcf
commit
522a7197a8
@ -76,7 +76,11 @@ func (r *Runtime) NewContainer(ctx context.Context, rSpec *spec.Spec, options ..
|
||||
ctr.config.LogPath = filepath.Join(ctr.config.StaticDir, "ctr.log")
|
||||
}
|
||||
if ctr.config.ShmDir == "" {
|
||||
ctr.config.ShmDir = filepath.Join(ctr.bundlePath(), "shm")
|
||||
if ctr.state.UserNSRoot == "" {
|
||||
ctr.config.ShmDir = filepath.Join(ctr.bundlePath(), "shm")
|
||||
} else {
|
||||
ctr.config.ShmDir = filepath.Join(ctr.state.UserNSRoot, "shm")
|
||||
}
|
||||
if err := os.MkdirAll(ctr.config.ShmDir, 0700); err != nil {
|
||||
if !os.IsExist(err) {
|
||||
return nil, errors.Wrapf(err, "unable to create shm %q dir", ctr.config.ShmDir)
|
||||
|
Reference in New Issue
Block a user