diff --git a/common/c_types.rs b/common/c_types.rs index a0f9c735d..5a9e4bb37 100644 --- a/common/c_types.rs +++ b/common/c_types.rs @@ -137,7 +137,7 @@ pub fn get_group(groupname: &str) -> Option { } } -fn get_group_list(name: *c_char, gid: gid_t) -> Result, int> { +pub fn get_group_list(name: *c_char, gid: gid_t) -> Result, int> { let mut ngroups = 0 as c_int; unsafe { getgrouplist(name, gid, 0 as *mut gid_t, &mut ngroups) }; @@ -151,7 +151,7 @@ fn get_group_list(name: *c_char, gid: gid_t) -> Result, int> { } } -fn get_groups() -> Result, int> { +pub fn get_groups() -> Result, int> { let ngroups = unsafe { getgroups(0, 0 as *mut gid_t) }; if ngroups == -1 { return Err(os::errno());