Skip to content

Commit

Permalink
Auto merge of rust-lang#709 - wezm:setresuid, r=alexcrichton
Browse files Browse the repository at this point in the history
Add setresgid & setresuid to FreeBSD and OpenBSD

These functions are both present in [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=setresuid&apropos=0&sektion=0&manpath=FreeBSD+11.1-RELEASE+and+Ports&arch=default&format=html) and [OpenBSD](http://man.openbsd.org/setresuid).
  • Loading branch information
bors committed Aug 2, 2017
2 parents 5e6853b + 81e4c5b commit c40b6af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,8 @@ extern {
pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
pub fn setutxent();
pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
}

#[link(name = "util")]
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/netbsdlike/openbsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ extern {
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
pub fn pledge(promises: *const ::c_char,
paths: *mut *const ::c_char) -> ::c_int;
pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
}

cfg_if! {
Expand Down

0 comments on commit c40b6af

Please sign in to comment.