diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-06-27 10:19:29 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-06-27 10:19:29 +0000 |
commit | 2e55dec21f3310e6868689fc1f4c4074ea3a35bb (patch) | |
tree | 77479d130301a86ca26009cf712dc0ebe3ddd340 /libc/pwd_grp/initgroups.c | |
parent | ea3abe244d9ad2ec59d00b29152fc457571d2d37 (diff) |
Fixup errno handling
-Erik
Diffstat (limited to 'libc/pwd_grp/initgroups.c')
-rw-r--r-- | libc/pwd_grp/initgroups.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <fcntl.h> #include <paths.h> #include <stdlib.h> +#include <errno.h> #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); |