The Samba-Bugzilla – Attachment 4181 Details for
Bug 6387
idmap_ldap_unixids_to_sids() makes winbind panic when multiple mappings are found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for the crashbug for v3-3-test and v3-2-test
idmap_ldap_unixids_to_sids_crashbug-v3-3-test.patch (text/plain), 1.70 KB, created by
Michael Adam
on 2009-05-22 05:41:31 UTC
(
hide
)
Description:
fix for the crashbug for v3-3-test and v3-2-test
Filename:
MIME Type:
Creator:
Michael Adam
Created:
2009-05-22 05:41:31 UTC
Size:
1.70 KB
patch
obsolete
>From 1863eea56dcd6be6e98c77b8d78a8b5e047a3ee5 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Fri, 22 May 2009 11:58:00 +0200 >Subject: [PATCH] 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@samba.org> >--- > source/winbindd/idmap_ldap.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/source/winbindd/idmap_ldap.c b/source/winbindd/idmap_ldap.c >index 7224589..854fd21 100644 >--- a/source/winbindd/idmap_ldap.c >+++ b/source/winbindd/idmap_ldap.c >@@ -892,6 +892,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; >@@ -979,7 +980,6 @@ again: > } > > for (i = 0; i < count; i++) { >- LDAPMessage *entry = NULL; > char *sidstr = NULL; > char *tmp = NULL; > enum id_type type; >-- >1.6.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6387
: 4181 |
4205