summaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless_unsupported.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-09-03 11:03:58 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-09-03 13:46:48 +0200
commitcfe1d2768847929b44ddd10184eff28fd5762c2d (patch)
tree779996dc578612776a8c13c3a9983668eb96738a /pkg/rootless/rootless_unsupported.go
parent099549bd38c2b39fb884c8e9aecdf4e44c90b484 (diff)
downloadpodman-cfe1d2768847929b44ddd10184eff28fd5762c2d.tar.gz
podman-cfe1d2768847929b44ddd10184eff28fd5762c2d.tar.bz2
podman-cfe1d2768847929b44ddd10184eff28fd5762c2d.zip
rootless: detect user namespace configuration changes
detect if the current user namespace doesn't match the configuration in the /etc/subuid and /etc/subgid files. If there is a mismatch, raise a warning and suggest the user to recreate the user namespace with "system migrate", that also restarts the containers. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/rootless/rootless_unsupported.go')
-rw-r--r--pkg/rootless/rootless_unsupported.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/rootless/rootless_unsupported.go b/pkg/rootless/rootless_unsupported.go
index a8485c083..16ba228e2 100644
--- a/pkg/rootless/rootless_unsupported.go
+++ b/pkg/rootless/rootless_unsupported.go
@@ -53,3 +53,9 @@ func EnableLinger() (string, error) {
func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []string) (bool, int, error) {
return false, -1, errors.New("this function is not supported on this os")
}
+
+// ConfigurationMatches checks whether the additional uids/gids configured for the user
+// match the current user namespace.
+func ConfigurationMatches() (bool, error) {
+ return true, nil
+}