From 2e55dec21f3310e6868689fc1f4c4074ea3a35bb Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 27 Jun 2003 10:19:29 +0000 Subject: Fixup errno handling -Erik --- libc/pwd_grp/initgroups.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/pwd_grp/initgroups.c') diff --git a/libc/pwd_grp/initgroups.c b/libc/pwd_grp/initgroups.c index 9c1fbc03c..24dadc18f 100644 --- a/libc/pwd_grp/initgroups.c +++ b/libc/pwd_grp/initgroups.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "config.h" #ifdef __UCLIBC_HAS_THREADS__ @@ -49,7 +50,7 @@ int initgroups(__const char *user, gid_t gid) if ((grp_fd = open(_PATH_GROUP, O_RDONLY)) < 0) - return -1; + return errno; num_groups = 0; group_list = (gid_t *) realloc(group_list, 1); -- cgit v1.2.3