Groups with no members - patch to winbindd_rpc.c

Ken Cross kcross at nssolutions.com
Fri Jul 11 12:38:00 GMT 2003


Samba-folk:

Winbindd returns this error for groups in NT domains with no members:

[2003/07/11 08:23:30, 1] nsswitch/winbindd_group.c:fill_grent_mem(93)
  could not lookup membership for group rid
S-1-5-21-153895333-338506710-270368766-10945 in domain NT4DOMAIN (error:
NT_STATUS_NO_MEMORY)


This only occurs for RCP lookups -- ADS is OK.  Here's the patch:


Index: nsswitch/winbindd_rpc.c
===================================================================
RCS file: /cvsroot/samba/source/nsswitch/winbindd_rpc.c,v
retrieving revision 1.25.2.15
diff -p -u -r1.25.2.15 winbindd_rpc.c
--- nsswitch/winbindd_rpc.c     25 Jun 2003 17:41:04 -0000      1.25.2.15
+++ nsswitch/winbindd_rpc.c     11 Jul 2003 12:33:24 -0000
@@ -629,7 +629,7 @@ static NTSTATUS lookup_groupmem(struct w
                (*sid_mem)[j] = rid_to_talloced_sid(domain, mem_ctx,
(rid_mem)[j]);
        }
 
-       if (!*names || !*name_types) {
+       if (*num_names > 0 && (!*names || !*name_types)) {
                result = NT_STATUS_NO_MEMORY;
                goto done;
        }

Ken
________________________________

Ken Cross

Network Storage Solutions
Phone 865.675.4070 ext 31
kcross at nssolutions.com 




More information about the samba-technical mailing list