build: set osusergo build tag by default (#14248)

This PR activates the osuergo build tag in GNUMakefile. This forces the os/user
package to be compiled without CGO. Doing so seems to resolve a race condition
in getpwnam_r that causes alloc creation to hang or panic on `user.Lookup("nobody")`.
This commit is contained in:
Seth Hoenig 2022-08-24 08:11:56 -05:00 committed by GitHub
parent 7ee3de3ea5
commit cfe9db0f66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

3
.changelog/14248.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
client: Fixed a bug where user lookups would hang or panic
```

View File

@ -21,7 +21,7 @@ ifndef BIN
BIN := $(GOPATH)/bin
endif
GO_TAGS ?=
GO_TAGS ?= osusergo
ifeq ($(CI),true)
GO_TAGS := codegen_generated $(GO_TAGS)