open-nomad/helper/users
Seth Hoenig ba1e337f8b
helpers: lockfree lookup of nobody user on unix systems (#14866)
* helpers: lockfree lookup of nobody user on linux and darwin

This PR continues the nobody user lookup saga, by making the nobody
user lookup lock-free on linux and darwin.

By doing the lookup in an init block this originally broke on Windows,
where we must avoid doing the lookup at all. We can get around that
breakage by only doing the lookup on linux/darwin where the nobody
user is going to exist.

Also return the nobody user by value so that a copy is created that
cannot be modified by callers of Nobody().

* helper: move nobody code into unix file
2022-10-11 08:38:05 -05:00
..
lookup.go helpers: lockfree lookup of nobody user on unix systems (#14866) 2022-10-11 08:38:05 -05:00
lookup_test.go client: protect user lookups with global lock (#14742) 2022-09-29 09:30:13 -05:00
lookup_unix.go helpers: lockfree lookup of nobody user on unix systems (#14866) 2022-10-11 08:38:05 -05:00