From c80fdc1a73c625e273f5df76ea9405f8aa3b9e38 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Tue, 17 Jun 2014 14:32:31 +0200 Subject: [PATCH] c_types: make get_groups/get_group_list public --- common/c_types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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());