-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
os/user: fix signedness of UIDs before stringifying #22739
Comments
We can fix os/user's User.Uid, but the Go 1 compatibility promise prevents us from changing the syscall.Getuid signature. You'll have to convert there. But it's the syscall package anyway, so people are expected to roll up their sleeves a bit. |
getuid
and co return signed integers; hilarity ensues
note the same applies to |
also, in case you're wondering, uids and gids of 0xffffffff aren't allowed because -1 is used as a flag to mean 'no change' for |
Change https://golang.org/cl/77930 mentions this issue: |
I handled gid in https://go-review.googlesource.com/#/c/go/+/77930 too. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?at least 1.6 and 1.9 (haven't checked elsewhere)
Does this issue reproduce with the latest release?
that's 1.9, right?
What operating system and processor architecture are you using (
go env
)?issue is with 32 bit Linux, only (so
GOARCH
of386
andarm
, andppc
)What did you do?
given
and
and
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: