Skip to content

Commit 2172bb4

Browse files
committed
Auto merge of rust-lang#802 - Mic92:setfsuid, r=alexcrichton
add setfsgid/setfsuid on Linux
2 parents 9a9f71e + 3406fe9 commit 2172bb4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libc-test/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ fn main() {
190190
cfg.header("sys/msg.h");
191191
cfg.header("sys/shm.h");
192192
cfg.header("sys/user.h");
193-
cfg.header("sys/fsuid.h");
194193
cfg.header("sys/timerfd.h");
195194
cfg.header("shadow.h");
196195
if !emscripten {
@@ -241,6 +240,8 @@ fn main() {
241240
}
242241

243242
if linux || android {
243+
cfg.header("sys/fsuid.h");
244+
244245
// DCCP support
245246
if !uclibc && !musl && !emscripten {
246247
cfg.header("linux/dccp.h");

src/unix/notbsd/android/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,8 @@ extern {
10501050
in_fd: ::c_int,
10511051
offset: *mut off_t,
10521052
count: ::size_t) -> ::ssize_t;
1053+
pub fn setfsgid(gid: ::gid_t) -> ::c_int;
1054+
pub fn setfsuid(uid: ::uid_t) -> ::c_int;
10531055
pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
10541056
#[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
10551057
pub fn getgrgid_r(uid: ::uid_t,

0 commit comments

Comments
 (0)