Skip to content

Commit

Permalink
Merge pull request #15040 from Luap99/api-umask
Browse files Browse the repository at this point in the history
API: libpod/create use correct default umask
  • Loading branch information
openshift-merge-robot authored Jul 22, 2022
2 parents d1f432d + 5a80770 commit f53234a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/api/handlers/libpod/containers_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
ContainerNetworkConfig: specgen.ContainerNetworkConfig{
UseImageHosts: conf.Containers.NoHosts,
},
ContainerSecurityConfig: specgen.ContainerSecurityConfig{
Umask: conf.Containers.Umask,
},
}

if err := json.NewDecoder(r.Body).Decode(&sg); err != nil {
Expand Down
3 changes: 2 additions & 1 deletion test/apiv2/20-containers.at
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ t GET libpod/containers/${cid}/json 200 \
.Id=$cid \
.State.Status~\\\(exited\\\|stopped\\\) \
.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

CNAME=myfoo
Expand Down

0 comments on commit f53234a

Please sign in to comment.