]> git.ipfire.org Git - thirdparty/util-linux.git/commit
pwdutils: Set errno with out of range UIDs/GIDs
authorTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 3 Apr 2026 13:58:40 +0000 (15:58 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 3 Apr 2026 14:36:49 +0000 (16:36 +0200)
commit5ad1da9bbc3eb9fc7952fe30514d4e0afa730fdc
treec5f911a480e8f0007079a2f1c246cf4fa17bb05a
parent699d086fa5f24651b375e5909c27e14a16ceb4b9
pwdutils: Set errno with out of range UIDs/GIDs

If a UID/GID is larger than its respective data type allows (but smaller
than uint64_t), then tools like newgrp erroneously assume that the user
or group simply does not exist.

Set errno to indicate that the supplied UID/GID is out of range instead.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/pwdutils.c