summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-02-18 04:48:32 +0000
committerJeremy Allison <jra@samba.org>2003-02-18 04:48:32 +0000
commit737f82e3b3150c0d1f981d6d949978ea33af119c (patch)
tree27a2806225c446a5b09c9914e42ea33fde9f32f8 /source3/lib
parentac30e445ba0291c67a5dec338f5c148298961e61 (diff)
downloadsamba-737f82e3b3150c0d1f981d6d949978ea33af119c.tar.gz
samba-737f82e3b3150c0d1f981d6d949978ea33af119c.tar.bz2
samba-737f82e3b3150c0d1f981d6d949978ea33af119c.zip
Ensure we use getgrnam() unless BROKEN_GETGRNAM is defined. I now need
to set this for Tru64. Jeremy. (This used to be commit a21154961135def29d7ede302ed09ce52fc22fc1)
Diffstat (limited to 'source3/lib')
-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
}
/****************************************************************