Skip to content

Commit

Permalink
build: set osusergo build tag by default (#14248)
Browse files Browse the repository at this point in the history
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")`.
  • Loading branch information
shoenig committed Aug 24, 2022
1 parent 43fe45d commit 2d425bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/14248.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
client: Fixed a bug where user lookups would hang or panic
```
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ifndef BIN
BIN := $(GOPATH)/bin
endif

GO_TAGS ?=
GO_TAGS ?= osusergo

ifeq ($(CI),true)
GO_TAGS := codegen_generated $(GO_TAGS)
Expand Down

0 comments on commit 2d425bf

Please sign in to comment.