• Kevin Burke's avatar
    os/user: add non-cgo versions of Lookup, LookupId · c2eb0619
    Kevin Burke authored
    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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    c2eb0619
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...