[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-13-24-g69a1c8d

Karolin Seeger kseeger at samba.org
Tue Aug 11 04:10:53 MDT 2009


The branch, v3-2-stable has been updated
       via  69a1c8de7f22194d04ebd00652dace654cc8af35 (commit)
       via  5750b8d6e1f8ff93276bb422e8e1ffe44dfbcf3c (commit)
      from  dd1e92e99786b98c60e5b0ebbe1b7edaae924fb8 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable


- Log -----------------------------------------------------------------
commit 69a1c8de7f22194d04ebd00652dace654cc8af35
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Aug 11 12:09:17 2009 +0200

    WHATSNEW: Update changes.
    
    Karolin
    (cherry picked from commit 6ee6e122fd81ab0b208e9f69cc1bd651e328d97c)

commit 5750b8d6e1f8ff93276bb422e8e1ffe44dfbcf3c
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 22 11:58:00 2009 +0200

    s3:winbind:idmap_ldap: fix a crash bug in idmap_ldap_unixids_to_sids (#6387)
    
    This fixes a crash bug hit when multiple mappings were found by
    the ldap search. This crash was caused by an ldap asssertion
    in ldap_next_entry because was set to NULL in each iteration.
    
    The corresponding fix was applied to the idmap_ldap_sids_to_unixids()
    by Jerry in 2007 (b066668b74768d9ed547f16bf7b6ba6aea5df20a).
    
    This fixes the crash part of bug #6387.
    
    There is a logic part, too:
    The problem currently only occurs when multiple mappings are found
    for one given unixid. Now winbindd does not crash any more but
    it does not correctly handle this situation. It just returns the
    last mapping from the ldap search results.
    This needs fixing.
    
    Michael
    (cherry picked from commit e9010fa366746ec1ae948dbcf3493d446e23b14c)
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 15652ee4259201a6d794c735d7e81631338f1050)

-----------------------------------------------------------------------

Summary of changes:
 WHATSNEW.txt                 |    2 ++
 source/winbindd/idmap_ldap.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 2360de9..fe89c9f 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -29,6 +29,8 @@ Changes since 3.2.13
 
 
 o   Michael Adam <obnox at samba.org>
+    * BUG 6387: Fix Winbind crash when multiple IDmappings exist in the
+      LDAP directory.
     * Prevent creation of keys containing the '/' character.
 
 
diff --git a/source/winbindd/idmap_ldap.c b/source/winbindd/idmap_ldap.c
index 53f6310..d4bf65b 100644
--- a/source/winbindd/idmap_ldap.c
+++ b/source/winbindd/idmap_ldap.c
@@ -893,6 +893,7 @@ static NTSTATUS idmap_ldap_unixids_to_sids(struct idmap_domain *dom,
 	TALLOC_CTX *memctx;
 	struct idmap_ldap_context *ctx;
 	LDAPMessage *result = NULL;
+	LDAPMessage *entry = NULL;
 	const char *uidNumber;
 	const char *gidNumber;
 	const char **attr_list;
@@ -988,7 +989,6 @@ again:
 	}
 
 	for (i = 0; i < count; i++) {
-		LDAPMessage *entry = NULL;
 		char *sidstr = NULL;
 	       	char *tmp = NULL;
 		enum id_type type;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list