Skip to content
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

x/sys/unix: add Getresuid and Getresgid #60483

Closed
mateusz834 opened this issue May 29, 2023 · 3 comments
Closed

x/sys/unix: add Getresuid and Getresgid #60483

mateusz834 opened this issue May 29, 2023 · 3 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mateusz834
Copy link
Member

The x/sys/unix package can set the suid (saved UID) through setresuid, but there is no way to retrieve it (the getresuid(2) is missing).

I propose adding Getresuid to the x/sys/unix package (also probably Getresgid) with following signature:

func Getresuid(ruid *int, euid *int, suid *int) (err error)
func Getresgid(rgid *int, egid *int, sgid *int) (err error)
@gopherbot gopherbot added this to the Proposal milestone May 29, 2023
@seankhliao seankhliao changed the title proposal: x/sys/unix add Getresuid and Getresgid x/sys/unix add Getresuid and Getresgid May 29, 2023
@seankhliao seankhliao added NeedsFix The path to resolution is known, but the work has not been done. and removed Proposal labels May 29, 2023
@seankhliao seankhliao modified the milestones: Proposal, Unreleased May 29, 2023
@seankhliao
Copy link
Member

Feel free to just file a CL, missing things for x/sys/unix can just be added without needing to go through proposal.

@gopherbot
Copy link

Change https://go.dev/cl/499055 mentions this issue: unix: add Getresuid, Getresgid on linux

@seankhliao seankhliao changed the title x/sys/unix add Getresuid and Getresgid x/sys/unix: add Getresuid and Getresgid May 29, 2023
oxzi added a commit to oxzi/golang-sys that referenced this issue Jun 3, 2023
Addresses golang/go#60483.

This change was successfully tested on amd64 and adjusted accordingly
for the other architectures.
oxzi added a commit to oxzi/golang-sys that referenced this issue Jun 3, 2023
Addresses golang/go#60483.

This change was successfully tested on amd64 and adjusted accordingly
for the other architectures.
@gopherbot
Copy link

Change https://go.dev/cl/500655 mentions this issue: unix: add Getresuid and Getresgid for OpenBSD

oxzi added a commit to oxzi/golang-sys that referenced this issue Jun 3, 2023
Addresses golang/go#60483.

This change was successfully tested on amd64 and adjusted accordingly
for the other architectures.
gopherbot pushed a commit to golang/sys that referenced this issue Jun 5, 2023
Addresses golang/go#60483 for OpenBSD.

This change was successfully tested on amd64 and adjusted accordingly for the other architectures.

Change-Id: Id63cca342d81d2cc5854eb2923ca7e66bfaa91bf
GitHub-Last-Rev: cff1170
GitHub-Pull-Request: #160
Reviewed-on: https://go-review.googlesource.com/c/sys/+/500655
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants