diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-24 22:39:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 22:39:26 +0200 |
commit | 2afe579c064923841a55d57458fac4d91bec8173 (patch) | |
tree | 698f40ce419698c30cf8969b9438b3aa395f8434 /pkg/namespaces/namespaces.go | |
parent | 10f3a8ac6bd9028f1c70ad48a7ebf2b2e33f2d6e (diff) | |
parent | 88f1994ab9a0bf3a8df3c8f74a39cd1db27c2070 (diff) | |
download | podman-2afe579c064923841a55d57458fac4d91bec8173.tar.gz podman-2afe579c064923841a55d57458fac4d91bec8173.tar.bz2 podman-2afe579c064923841a55d57458fac4d91bec8173.zip |
Merge pull request #5971 from giuseppe/fix-userns-tests
v2, podman: fix and enable all run_userns_test.go tests
Diffstat (limited to 'pkg/namespaces/namespaces.go')
-rw-r--r-- | pkg/namespaces/namespaces.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/namespaces/namespaces.go b/pkg/namespaces/namespaces.go index 2cb3c3f20..2ffbde977 100644 --- a/pkg/namespaces/namespaces.go +++ b/pkg/namespaces/namespaces.go @@ -31,7 +31,7 @@ func (n CgroupMode) IsHost() bool { // IsDefaultValue indicates whether the cgroup namespace has the default value. func (n CgroupMode) IsDefaultValue() bool { - return n == "" + return n == "" || n == defaultType } // IsNS indicates a cgroup namespace passed in by path (ns:<path>) @@ -102,6 +102,11 @@ func (n UsernsMode) IsAuto() bool { return parts[0] == "auto" } +// IsDefaultValue indicates whether the user namespace has the default value. +func (n UsernsMode) IsDefaultValue() bool { + return n == "" || n == defaultType +} + // GetAutoOptions returns a AutoUserNsOptions with the settings to setup automatically // a user namespace. func (n UsernsMode) GetAutoOptions() (*storage.AutoUserNsOptions, error) { |