-
Notifications
You must be signed in to change notification settings - Fork 18k
os/user: TestCredentialNoSetGroups failed #56942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
are you uid 501? |
Yes, my UserID is 501 which is the first user account after setting up macOS. |
Without cgo:
|
501 is the standard UID for the first user on macOS. The non-cgo non-syscall path looks at /etc/passwd, which explicitly says is only used in single-user mode and does not contain any actual users (at least as far back as 10.12 and as recent as 12.6.1). No idea what's going on in the syscall path, unless it's also not using that path and going down the non-cgo path instead? |
The non-cgo path does not run on macOS anymore. That file says
The cgo_lookup_unix.go code, despite the file name, runs always on macOS, since it doesn't actually use cgo (it uses direct libc calls instead):
So there shouldn't be any problem with cgo vs non-cgo. And nothing should be reading /etc/passwd. Clearly something about the cgo path is not right anymore. |
I can't seem to reproduce this on either of my Macs. It would help if you could check which of these two CLs introduces the breakage: 2022-11-10 c3d444d os/user: allocate buffers in Go memory, not C memory My guess is the first one is OK and the second one is what breaks. But knowing for sure would help narrow the search. Thanks. |
Change https://go.dev/cl/455815 mentions this issue: |
Found the problem, CL sent. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
N/A
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Rebuild from the source (run all.bash)
What did you expect to see?
No error
What did you see instead?
The text was updated successfully, but these errors were encountered: