summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-02-18 04:49:31 +0000
committerJeremy Allison <jra@samba.org>2003-02-18 04:49:31 +0000
commitfb8d1412e1e109a1af8acc759c128df8c82bd47d (patch)
tree0125c0d11fc2f130d00ee502e34678cc6c614de0
parent336ae66c5a7bbb9387e2b4fa74afa7c61fe5206a (diff)
downloadsamba-fb8d1412e1e109a1af8acc759c128df8c82bd47d.tar.gz
samba-fb8d1412e1e109a1af8acc759c128df8c82bd47d.tar.bz2
samba-fb8d1412e1e109a1af8acc759c128df8c82bd47d.zip
Ensure we use getgrnam() unless BROKEN_GETGRNAM is defined. I now need
to set this for Tru64. Jeremy. (This used to be commit e7c4616c45ea5ec7c04022d6cca49ac70adde121)
-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
}
/****************************************************************