From 3eb6b2a6c3f36cbc03c458d50586a6cf5e518002 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Jan 2004 23:43:07 +0000 Subject: (merge from 3.0) Having no members of a group is a perfectly valid (if unusual) situation. Andrew Bartlett (This used to be commit bc77b586be6992a662422304dbefbd4b833818fb) --- source3/nsswitch/winbindd_rpc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c index b13d419110..916ae78d21 100644 --- a/source3/nsswitch/winbindd_rpc.c +++ b/source3/nsswitch/winbindd_rpc.c @@ -631,6 +631,13 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, if (!NT_STATUS_IS_OK(result)) goto done; + if (!*num_names) { + names = NULL; + name_types = NULL; + sid_mem = NULL; + goto done; + } + /* Step #2: Convert list of rids into list of usernames. Do this in bunches of ~1000 to avoid crashing NT4. It looks like there is a buffer overflow or something like that lurking around -- cgit