summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-22 05:40:32 -0400
committerGitHub <noreply@github.com>2020-07-22 05:40:32 -0400
commit59bad8bf7176398dbab6b59867b17567691ffda3 (patch)
treec2516dae009b868a21b3d81bd7711228d09a7f60 /libpod/define
parent2643967bc04ee3ab9f8c204bb5a4258588d03ad9 (diff)
parentd4d3fbc155419f4017064a65e718ad78d50115cc (diff)
downloadpodman-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/define')
-rw-r--r--libpod/define/config.go2
-rw-r--r--libpod/define/container_inspect.go2
2 files changed, 4 insertions, 0 deletions
diff --git a/libpod/define/config.go b/libpod/define/config.go
index 64b24d9e2..6c426f2ec 100644
--- a/libpod/define/config.go
+++ b/libpod/define/config.go
@@ -20,6 +20,8 @@ var (
NameRegex = regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$")
// RegexError is thrown in presence of an invalid container/pod name.
RegexError = errors.Wrapf(ErrInvalidArg, "names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*")
+ // UmaskRegex is a regular expression to validate Umask.
+ UmaskRegex = regexp.MustCompile(`^[0-7]{1,4}$`)
)
const (
diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go
index fbd9da3e7..a08cb3de6 100644
--- a/libpod/define/container_inspect.go
+++ b/libpod/define/container_inspect.go
@@ -61,6 +61,8 @@ type InspectContainerConfig struct {
// systemd mode, the container configuration is customized to optimize
// running systemd in the container.
SystemdMode bool `json:"SystemdMode,omitempty"`
+ // Umask is the umask inside the container.
+ Umask string `json:"Umask,omitempty"`
}
// InspectRestartPolicy holds information about the container's restart policy.