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

Enable setresuid and setresgid for more platforms #717

Closed
wezm opened this issue Jul 31, 2017 · 6 comments
Closed

Enable setresuid and setresgid for more platforms #717

wezm opened this issue Jul 31, 2017 · 6 comments

Comments

@wezm
Copy link
Contributor

wezm commented Jul 31, 2017

unistd::setresuid and unistd::setresgid are currently wrapped in a module that only is only included on Linux and Android. The functions appear to be present on other systems as well:

NetBSD and macOS don't appear to have them.

@Susurrus
Copy link
Contributor

Would you be will in to file a PR enabling them on those platforms? You'll need the check that they're all defined in libc beforehand so everything will pass CI.

@wezm
Copy link
Contributor Author

wezm commented Jul 31, 2017

Yep definitely. Will aim to do it this week.

@Susurrus
Copy link
Contributor

Susurrus commented Aug 1, 2017

@wezm Excellent, thanks for being willing to contribute! In the future, feel free to just file a PR instead of both an issue and a PR, unless you're uncertain if we'd accept the feature. It generates slightly less noise for us maintainers :-)

@wezm
Copy link
Contributor Author

wezm commented Aug 1, 2017

Ok, no problem, will do. Turns out neither of these functions are in the libc crate (for FreeBSD and OpenBSD). So I'll have to do the dance of getting them added there first.

@Susurrus
Copy link
Contributor

Susurrus commented Aug 1, 2017

@wezm Excellent, thanks. If you could add it for all supported platforms also, so we can offer pretty complete support here in nix, it'd be much appreciated. When you create an issue, please link it to this one so I can track progress.

bors bot added a commit that referenced this issue Aug 7, 2017
721: Enable setresuid/setresgid on FreeBSD and OpenBSD r=asomers

Fixes #717 

This PR enables `setresuid` and `setresgid` on FreeBSD and OpenBSD. These functions are not present on NetBSD, macOS, and iOS as far as I can tell.
@bors bors bot closed this as completed in #721 Aug 7, 2017
@jlgerber
Copy link

What about OS X?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants