(merge from 3.0)
authorAndrew Bartlett <abartlet@samba.org>
Mon, 5 Jan 2004 23:43:07 +0000 (23:43 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 5 Jan 2004 23:43:07 +0000 (23:43 +0000)
Having no members of a group is a perfectly valid (if unusual) situation.

Andrew Bartlett

source/nsswitch/winbindd_rpc.c

index b13d4191106daf6997e05861cd3b084d86785506..916ae78d2171d3bb5b798ac4b4fe8c8bbd68565e 100644 (file)
@@ -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