-
Notifications
You must be signed in to change notification settings - Fork 666
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
Add getresuid() and getresgid() to unistd #1430
Conversation
3971a9b
to
43e074e
Compare
@asomers What should be done with the unrelated test failure? |
43e074e
to
b86ffd5
Compare
src/unistd.rs
Outdated
/// - `Err(x)`: libc error code on failure. | ||
/// | ||
#[inline] | ||
pub fn getresuid() -> Result<(Uid, Uid, Uid)> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning a tuple is a very old fashioned and failure-prone technique. Better to return a structure. That way the meaning is obvious even without consulting the documentation. Something like:
struct ResUid {
real: Uid,
effective: Uid,
saved: uid
}
9450b0b
to
ae59760
Compare
Looks good, but you'll have to rebase to fix the CI failure on FreeBSD. |
ae59760
to
ef58b0a
Compare
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. | |||
This project adheres to [Semantic Versioning](https://semver.org/). | |||
|
|||
## [Unreleased] - ReleaseDate | |||
### Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the CHANGELOG. There was a merge error, and now there are two "Added" sections.
ef58b0a
to
b481a0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
No description provided.