]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib: (pwdutils.c) improve error return protocol for callers
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Wed, 8 Apr 2026 04:47:49 +0000 (00:47 -0400)
committerChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 9 Apr 2026 14:11:09 +0000 (10:11 -0400)
commit13d1ba714e6162ae1e746dc7caff914a3bc0e64a
tree066986f7e27db58148326813ead943c2d0622aa1
parent2cc4450d8e93968cb159c24d45b5ebd0e42f1e0b
lib: (pwdutils.c) improve error return protocol for callers

In some cases libc does not properly set errno when no passwd
or group entry was found by getpwnam or getgrnam like functions.
This becomes an issue when callers have to provide coherent error
messages with err(). Therefore, let us improve the errno protocol
in internal wrapper functions for the above mentioned and set errno
 when libc does not.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
lib/pwdutils.c