Skip to content

Commit 852db73

Browse files
authored
Merge pull request rust-lang#441 from billiob/setfsuid
Add setfsgid()/setfsuid() on linux
2 parents bdaf9d5 + 28d0afa commit 852db73

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

libc-test/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ fn main() {
162162
cfg.header("sys/ipc.h");
163163
cfg.header("sys/msg.h");
164164
cfg.header("sys/shm.h");
165+
cfg.header("sys/fsuid.h");
165166
cfg.header("pty.h");
166167
cfg.header("shadow.h");
167168
}

src/unix/notbsd/linux/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ extern {
714714
riovcnt: ::c_ulong,
715715
flags: ::c_ulong) -> isize;
716716
pub fn reboot(how_to: ::c_int) -> ::c_int;
717+
pub fn setfsgid(gid: ::gid_t) -> ::c_int;
718+
pub fn setfsuid(uid: ::uid_t) -> ::c_int;
717719
pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
718720
pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
719721

0 commit comments

Comments
 (0)