summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/util_getent.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/lib/util_getent.c b/source3/lib/util_getent.c
index 6699ce3e92..7d45287bba 100644
--- a/source3/lib/util_getent.c
+++ b/source3/lib/util_getent.c
@@ -274,6 +274,12 @@ struct sys_userlist *get_users_in_group(const char *gname)
}
}
+#if !defined(BROKEN_GETGRNAM)
+ if ((gptr = (struct group *)getgrnam(gname)) == NULL)
+ return NULL;
+ return add_members_to_userlist(list_head, gptr);
+#else
+ /* BROKEN_GETGRNAM - True64 */
setgrent();
while((gptr = getgrent()) != NULL) {
if (strequal(gname, gptr->gr_name)) {
@@ -284,6 +290,7 @@ struct sys_userlist *get_users_in_group(const char *gname)
}
endgrent();
return list_head;
+#endif
}
/****************************************************************