Skip to content

Commit

Permalink
Add getgrouplist()
Browse files Browse the repository at this point in the history
  • Loading branch information
JayH5 committed Aug 12, 2017
1 parent 2d22c18 commit d5326a1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,10 @@ extern {
pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char,
flags: ::c_int) -> ::c_int;

pub fn getgrouplist(name: *const ::c_char,
basegid: ::c_int,
groups: *mut ::c_int,
ngroups: *mut ::c_int) -> ::c_int;
pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int;

#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
Expand Down
4 changes: 4 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,10 @@ extern {
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;
pub fn getgrouplist(name: *const ::c_char,
basegid: ::gid_t,
groups: *mut ::gid_t,
ngroups: *mut ::c_int) -> ::c_int;
pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
}

Expand Down
4 changes: 4 additions & 0 deletions src/unix/bsd/netbsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,10 @@ extern {
abstime: *const ::timespec) -> ::c_int;
pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;

pub fn getgrouplist(name: *const ::c_char,
basegid: ::gid_t,
groups: *mut ::gid_t,
ngroups: *mut ::c_int) -> ::c_int;
pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
}

Expand Down
4 changes: 4 additions & 0 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,10 @@ extern {
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
pub fn setgroups(ngroups: ::size_t,
ptr: *const ::gid_t) -> ::c_int;
pub fn getgrouplist(user: *const ::c_char,
group: ::gid_t,
groups: *mut ::gid_t,
ngroups: *mut ::c_int) -> ::c_int;
pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
pub fn sched_setscheduler(pid: ::pid_t,
policy: ::c_int,
Expand Down

0 comments on commit d5326a1

Please sign in to comment.