]> Cypherpunks repositories - gostls13.git/commit
os/user: make Lookup* functions properly handle ENOENT
authorBen Hoyt <benhoyt@gmail.com>
Mon, 10 Jun 2024 08:49:33 +0000 (20:49 +1200)
committerGopher Robot <gobot@golang.org>
Tue, 11 Jun 2024 17:08:14 +0000 (17:08 +0000)
commitaed1f925f24d4ad6ff2f2d77c04e4c5b72fdb49f
tree5e9c67c4f106cc0cfd948216d62c2336c07806da
parent5d850046222b52dd79c5b9cb3d63449aa126c988
os/user: make Lookup* functions properly handle ENOENT

The libc docs say that these functions can return ENOENT, and
per issue #67912, this does happen in practice sometimes. Handle
both the ENOENT and !found cases the same way, for Lookup,
LookupId, LookupGroup, LookupGroupId.

Fixes #67912

Change-Id: I993935af44c83ad785b6cd735fc313a3647daa19
Reviewed-on: https://go-review.googlesource.com/c/go/+/591555
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/os/user/cgo_lookup_unix.go