mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
podman: assume user namespace if there are mappings
if some mappings are specified, assume there is a private user namespace. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user