summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-21 00:13:16 +0000
committerJeremy Allison <jra@samba.org>2004-05-21 00:13:16 +0000
commit503011e451844f6747e1090bdd21e5a9beeff942 (patch)
treef504f375331f41c8bb59907d92eeada9dcdd7090
parente6a8771197d14b95086f9ebe416d9028d4009847 (diff)
downloadsamba-503011e451844f6747e1090bdd21e5a9beeff942.tar.gz
r805: Fix to stop smbd hanging on missing group member from "Jianliang Lu" <j.lu@tiesse.com>.
Jeremy.
-rw-r--r--source/rpc_server/srv_samr_nt.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index eca0913c1c2..ea631d7c851 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -3295,16 +3295,12 @@ static BOOL get_memberuids(gid_t gid, uid_t **uids, int *num)
/* Secondary group members */
- gr = grp->gr_mem;
- while ((*gr != NULL) && ((*gr)[0] != '\0')) {
+ for (gr = grp->gr_mem; (*gr != NULL) && ((*gr)[0] != '\0'); gr += 1) {
struct passwd *pw = getpwnam(*gr);
if (pw == NULL)
continue;
-
add_uid_to_array_unique(pw->pw_uid, uids, num);
-
- gr += 1;
}
winbind_on();