-
Notifications
You must be signed in to change notification settings - Fork 18k
os/user: on Windows, user.LookupId fails with special built-in SIDs #49509
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
Labels
Milestone
Comments
CC @bufflig |
dblohm7
added a commit
to tailscale/go
that referenced
this issue
Oct 27, 2022
…groups as valid. Some built-in Windows accounts such as `NT AUTHORITY\SYSTEM` are considered to be users, but are classified by the OS as syscall.SidTypeWellKnownGroup, not as syscall.SidTypeUser. This change modifies account querying to consider both types to be valid. Fixes golang#49509 Signed-off-by: Aaron Klotz <[email protected]>
dblohm7
added a commit
to dblohm7/go
that referenced
this issue
Nov 17, 2022
…counts This change modifies account querying to consider both syscall.SidTypeUser and syscall.SidTypeWellKnownGroup types to be valid for user accounts. Some built-in Windows accounts such as 'NT AUTHORITY\SYSTEM' are treated by the OS as users, but are internally classified by the OS as syscall.SidTypeWellKnownGroup instead of syscall.SidTypeUser. Fixes golang#49509
Change https://go.dev/cl/452497 mentions this issue: |
Change https://go.dev/cl/626255 mentions this issue: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
AFICT the problem is here:
https://cs.opensource.google/go/go/+/refs/tags/go1.17.3:src/os/user/lookup_windows.go;l=237
syscall.SidTypeWellKnownGroup
is returned for some SIDs that are built-in to the OS.What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Build this program for Windows and run it on Windows.
What did you expect to see?
Successful output from the test program for
NT AUTHORITY\SYSTEM
What did you see instead?
Error message:
The text was updated successfully, but these errors were encountered: