mirror of
https://github.com/containers/podman.git
synced 2025-12-16 20:47:47 +08:00
4
vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go
generated
vendored
4
vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go
generated
vendored
@@ -394,7 +394,9 @@ func hasFullUsersMappings() (bool, error) {
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
// if the uid_map contains 4294967295, the entire IDs space is available in the
|
||||
// The kernel rejects attempts to create mappings where either starting
|
||||
// point is (u32)-1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/user_namespace.c?id=af3e9579ecfb#n1006 .
|
||||
// So, if the uid_map contains 4294967295, the entire IDs space is available in the
|
||||
// user namespace, so it is likely the initial user namespace.
|
||||
return bytes.Contains(content, []byte("4294967295")), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user