os/user: add non-cgo versions of Lookup, LookupId
If you cross compile for a Unix target and call user.Lookup("root") or user.LookupId("0"), we'll try to read the answer out of /etc/passwd instead of returning an "unimplemented" error. The equivalent cgo function calls getpwuid_r in glibc, which may reach out to the NSS database or allow callers to register extensions. The pure Go implementation only reads from /etc/passwd. Change-Id: I56a302d634b15ba5097f9f0d6a758c68e486ba6d Reviewed-on: https://go-review.googlesource.com/37664Reviewed-by:Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please
register
or
sign in
to comment