7 ms·
Which uses libc via CGO or parses /etc/passwd with no CGO, which won't work for some cases. https://github.com/tailscale/tailscale/blob/e4144230f410204aa2f43a0
by dchest 2mo ago
Which uses libc via CGO or parses /etc/passwd with no CGO, which won't work for some cases.
https://github.com/tailscale/tailscale/blob/e4144230f410204aa2f43a07a57182c751239597/util/osuser/user.go#L144-L148 https://github.com/tailscale/tailscale/blob/e4144230f410204a...
// userLookupGetent uses "getent" to look up users so that even with static
// tailscaled binaries without cgo (as we distribute), we can still look up
// PAM/NSS users which the standard library's os/user without cgo won't get
// (because of no libc hooks). If "getent" fails, userLookupGetent falls back
// to the standard library.