Sub ID ranges whose owner/user has no /etc/passwd entry are silently ignored. getsubids reports no ranges for such a user even though the entry is present in /etc/subuid. Entries owned by a name that deliberately has no account are now silently invisible.
Reproduction
$ printf 'phantom:900000:65536\n' | sudo tee -a /etc/subuid
$ getsubids phantom
Error fetching ranges
$ echo $?
1
Entries in the same file owned by an existing account are unaffected and return their ranges normally. The only thing that differs is whether the owner exists in /etc/passwd.
I discovered this when using Podman's rootful --userns=auto, resulting in this error...
ERRO[0000] Cannot find mappings for user "containers": no subuid ranges found for user "containers" in /etc/subuid
Error: creating container storage: not enough unused IDs in user namespace
Podman allocates ranges from an owner named containers, and it's mentioned in a podman discussion that it doesn't need to be a real account (though this might be advice no longer relevant).
podman-container-tools/podman#24951
I couldn't tell if requiring a passwd entry is intentional or not. But until 4.20 it wasn't required...
Sub ID ranges whose owner/user has no
/etc/passwdentry are silently ignored.getsubidsreports no ranges for such a user even though the entry is present in /etc/subuid. Entries owned by a name that deliberately has no account are now silently invisible.Reproduction
Entries in the same file owned by an existing account are unaffected and return their ranges normally. The only thing that differs is whether the owner exists in /etc/passwd.
I discovered this when using Podman's rootful
--userns=auto, resulting in this error...Podman allocates ranges from an owner named
containers, and it's mentioned in a podman discussion that it doesn't need to be a real account (though this might be advice no longer relevant).podman-container-tools/podman#24951
I couldn't tell if requiring a passwd entry is intentional or not. But until 4.20 it wasn't required...