mirror of
https://github.com/containers/podman.git
synced 2025-05-21 00:56:36 +08:00
API: libpod/create use correct default umask
Make sure containers created via API have the correct umask from containers.conf set. Fixes #15036 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -31,6 +31,9 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
|
|||||||
ContainerNetworkConfig: specgen.ContainerNetworkConfig{
|
ContainerNetworkConfig: specgen.ContainerNetworkConfig{
|
||||||
UseImageHosts: conf.Containers.NoHosts,
|
UseImageHosts: conf.Containers.NoHosts,
|
||||||
},
|
},
|
||||||
|
ContainerSecurityConfig: specgen.ContainerSecurityConfig{
|
||||||
|
Umask: conf.Containers.Umask,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := json.NewDecoder(r.Body).Decode(&sg); err != nil {
|
if err := json.NewDecoder(r.Body).Decode(&sg); err != nil {
|
||||||
|
@ -123,7 +123,8 @@ t GET libpod/containers/${cid}/json 200 \
|
|||||||
.Id=$cid \
|
.Id=$cid \
|
||||||
.State.Status~\\\(exited\\\|stopped\\\) \
|
.State.Status~\\\(exited\\\|stopped\\\) \
|
||||||
.State.Running=false \
|
.State.Running=false \
|
||||||
.State.ExitCode=0
|
.State.ExitCode=0 \
|
||||||
|
.Config.Umask=0022 # regression check for #15036
|
||||||
t DELETE libpod/containers/$cid 200 .[0].Id=$cid
|
t DELETE libpod/containers/$cid 200 .[0].Id=$cid
|
||||||
|
|
||||||
CNAME=myfoo
|
CNAME=myfoo
|
||||||
|
Reference in New Issue
Block a user