git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac30e44
)
Ensure we use getgrnam() unless BROKEN_GETGRNAM is defined. I now need
author
Jeremy Allison
<jra@samba.org>
Tue, 18 Feb 2003 04:48:32 +0000
(
04:48
+0000)
committer
Jeremy Allison
<jra@samba.org>
Tue, 18 Feb 2003 04:48:32 +0000
(
04:48
+0000)
to set this for Tru64.
Jeremy.
(This used to be commit
a21154961135def29d7ede302ed09ce52fc22fc1
)
source3/lib/util_getent.c
patch
|
blob
|
history
diff --git
a/source3/lib/util_getent.c
b/source3/lib/util_getent.c
index 6699ce3e92393ebfab01a37210c730a2e5eb9f34..7d45287bbad9d2a73cfcd33362a1474e90b42de0 100644
(file)
--- 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
}
/****************************************************************