summaryrefslogtreecommitdiff
path: root/src/group-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/group-list.c')
-rw-r--r--src/group-list.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/group-list.c b/src/group-list.c
index 4c5391ddb..1fadd0c57 100644
--- a/src/group-list.c
+++ b/src/group-list.c
@@ -54,14 +54,13 @@ print_group_list (const char *username,
ok = false;
}
-#if HAVE_GETGROUPS
{
- GETGROUPS_T *groups;
+ gid_t *groups;
int i;
int n_groups = mgetgroups (username, (pwd ? pwd->pw_gid : (gid_t) -1),
&groups);
- if (n_groups < 0)
+ if (n_groups < 0 && errno != ENOSYS)
{
if (username)
{
@@ -84,7 +83,6 @@ print_group_list (const char *username,
}
free (groups);
}
-#endif /* HAVE_GETGROUPS */
return ok;
}