diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-22 05:40:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 05:40:32 -0400 |
commit | 59bad8bf7176398dbab6b59867b17567691ffda3 (patch) | |
tree | c2516dae009b868a21b3d81bd7711228d09a7f60 /libpod/container_inspect.go | |
parent | 2643967bc04ee3ab9f8c204bb5a4258588d03ad9 (diff) | |
parent | d4d3fbc155419f4017064a65e718ad78d50115cc (diff) | |
download | podman-59bad8bf7176398dbab6b59867b17567691ffda3.tar.gz podman-59bad8bf7176398dbab6b59867b17567691ffda3.tar.bz2 podman-59bad8bf7176398dbab6b59867b17567691ffda3.zip |
Merge pull request #7006 from ashley-cui/umask
Add --umask flag for create, run
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r-- | libpod/container_inspect.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index 680776dba..a0d223c8c 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -325,6 +325,14 @@ func (c *Container) generateInspectContainerConfig(spec *spec.Spec) *define.Insp ctrConfig.Timezone = c.config.Timezone + // Pad Umask to 4 characters + if len(c.config.Umask) < 4 { + pad := strings.Repeat("0", 4-len(c.config.Umask)) + ctrConfig.Umask = pad + c.config.Umask + } else { + ctrConfig.Umask = c.config.Umask + } + return ctrConfig } |