Winbindd dies when running "getent group" on a PDC based on Samba 3.2.4 with
"ldapsam:editposix" enabled (see attachments).
The crash of Winbindd happens when getent tries to enumerate the users members of a group
where there are computer accounts (like "domain users" group).
I think it's a problem of "sam_lookup_groupmem", in "winbindd_passdb.c", that do not sets properly the pointers in
"**name_types" and "***names" (the concept also applies to Samba 3.3.0pre2, I think)
I propose the attached patch ("winbindd_passdb.patch")
--- winbindd_passdb.c 2008-09-18 08:49:02.000000000 +0200
+++ Pwinbindd_passdb.c 2008-11-16 17:33:06.000000000 +0100
@@ -638,13 +638,13 @@ static NTSTATUS sam_lookup_groupmem(stru
- if (!((*names)[i] = talloc_strdup((*names),
+ if (!((*names)[num_mapped] = talloc_strdup((*names),
- (*name_types)[i] = lsa_names[i].type;
+ (*name_types)[num_mapped] = lsa_names[i].type;
num_mapped += 1;
The tests were performed on Debian Lenny, with
Linux 2.6.26/220.127.116.11 (compiled from source)
openldap-2.4.11 (compiled from source)
nss_ldap-263 (compiled from source)
Samba 3.2.4 (compiled from source)
PS: I'm sorry for my bad english.
Created attachment 3739 [details]
Created attachment 3740 [details]
(my PDC) Samba's configuration file.
Created attachment 3741 [details]
Winbindd log file.
Created attachment 3742 [details]
The patch for "sam_lookup_groupmem" in winbindd/winbindd_passdb.c
Created attachment 3743 [details]
Samba's configuration file.
This looks perfectly correct - thanks for the patch ! Applying to 3.2.x and 3.3.x and master git branches !
Applied to all git branches.
a big thank to you and to entire team for Samba!