• 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
..
cgo_lookup_unix.go Loading commit data...
getgrouplist_darwin.go Loading commit data...
getgrouplist_unix.go Loading commit data...
listgroups_solaris.go Loading commit data...
listgroups_unix.go Loading commit data...
lookup.go Loading commit data...
lookup_android.go Loading commit data...
lookup_plan9.go Loading commit data...
lookup_stubs.go Loading commit data...
lookup_unix.go Loading commit data...
lookup_unix_test.go Loading commit data...
lookup_windows.go Loading commit data...
user.go Loading commit data...
user_test.go Loading commit data...