[Pkg-samba-maint] r3425 - in branches/samba/lenny/debian: . patches

bubulle at alioth.debian.org bubulle at alioth.debian.org
Sat Apr 10 04:59:59 UTC 2010


tags 538819 pending
thanks

Author: bubulle
Date: 2010-04-10 04:59:56 +0000 (Sat, 10 Apr 2010)
New Revision: 3425

Added:
   branches/samba/lenny/debian/patches/bug_538819_upstream_7021.patch
Modified:
   branches/samba/lenny/debian/changelog
   branches/samba/lenny/debian/patches/series
Log:
Release 2:3.2.5-4lenny11
Fix memory leaks related to trustdom passwords


Modified: branches/samba/lenny/debian/changelog
===================================================================
--- branches/samba/lenny/debian/changelog	2010-04-09 20:34:09 UTC (rev 3424)
+++ branches/samba/lenny/debian/changelog	2010-04-10 04:59:56 UTC (rev 3425)
@@ -1,9 +1,15 @@
-samba (2:3.2.5-4lenny10) stable-proposed-updates-UNRELEASED; urgency=low
+samba (2:3.2.5-4lenny11) stable-proposed-updates; urgency=low
 
+  * Fix memory leaks  regarding trustdom passwords. Closes: #538819
+
+ -- Christian Perrier <bubulle at debian.org>  Fri, 09 Apr 2010 22:39:24 +0200
+
+samba (2:3.2.5-4lenny10) stable-proposed-updates; urgency=low
+
   * Fix interdomain trust with w2k8r2 servers. This makes lenny's
     samba unusable in some situations. Closes: #575951
 
- -- Christian Perrier <bubulle at debian.org>  Sun, 04 Apr 2010 16:58:49 +0200
+ -- Christian Perrier <bubulle at debian.org>  Tue, 06 Apr 2010 20:12:34 +0200
 
 samba (2:3.2.5-4lenny9) stable-security; urgency=low
 

Added: branches/samba/lenny/debian/patches/bug_538819_upstream_7021.patch
===================================================================
--- branches/samba/lenny/debian/patches/bug_538819_upstream_7021.patch	                        (rev 0)
+++ branches/samba/lenny/debian/patches/bug_538819_upstream_7021.patch	2010-04-10 04:59:56 UTC (rev 3425)
@@ -0,0 +1,86 @@
+Goal: Fix some memleaks regarding trustdom passwords
+
+Fixes: #538819
+
+Status wrt upstream: Fixed in 3.4.4
+
+Author: Volker Lendecke <vl at samba.org>
+
+---
+ source/passdb/pdb_ldap.c |   18 +++++++++++++++---
+ 1 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c
+index 9c135c1..7e6764e 100644
+--- a/source/passdb/pdb_ldap.c
++++ b/source/passdb/pdb_ldap.c
+@@ -5760,6 +5760,7 @@ static char *trusteddom_dn(struct ldapsam_privates *ldap_state,
+ }
+ 
+ static bool get_trusteddom_pw_int(struct ldapsam_privates *ldap_state,
++				  TALLOC_CTX *mem_ctx,
+ 				  const char *domain, LDAPMessage **entry)
+ {
+ 	int rc;
+@@ -5782,6 +5783,10 @@ static bool get_trusteddom_pw_int(struct ldapsam_privates *ldap_state,
+ 	rc = smbldap_search(ldap_state->smbldap_state, trusted_dn, scope,
+ 			    filter, attrs, attrsonly, &result);
+ 
++	if (result != NULL) {
++		talloc_autofree_ldapmsg(mem_ctx, result);
++	}
++
+ 	if (rc == LDAP_NO_SUCH_OBJECT) {
+ 		*entry = NULL;
+ 		return True;
+@@ -5824,7 +5829,7 @@ static bool ldapsam_get_trusteddom_pw(struct pdb_methods *methods,
+ 
+ 	DEBUG(10, ("ldapsam_get_trusteddom_pw called for domain %s\n", domain));
+ 
+-	if (!get_trusteddom_pw_int(ldap_state, domain, &entry) ||
++	if (!get_trusteddom_pw_int(ldap_state, talloc_tos(), domain, &entry) ||
+ 	    (entry == NULL))
+ 	{
+ 		return False;
+@@ -5895,7 +5900,7 @@ static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
+ 	 * get the current entry (if there is one) in order to put the
+ 	 * current password into the previous password attribute
+ 	 */
+-	if (!get_trusteddom_pw_int(ldap_state, domain, &entry)) {
++	if (!get_trusteddom_pw_int(ldap_state, talloc_tos(), domain, &entry)) {
+ 		return False;
+ 	}
+ 
+@@ -5910,6 +5915,9 @@ static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
+ 			 talloc_asprintf(talloc_tos(), "%li", time(NULL)));
+ 	smbldap_make_mod(priv2ld(ldap_state), entry, &mods,
+ 			 "sambaClearTextPassword", pwd);
++
++	talloc_autofree_ldapmod(talloc_tos(), mods);
++
+ 	if (entry != NULL) {
+ 		prev_pwd = smbldap_talloc_single_attribute(priv2ld(ldap_state),
+ 				entry, "sambaClearTextPassword", talloc_tos());
+@@ -5947,7 +5955,7 @@ static bool ldapsam_del_trusteddom_pw(struct pdb_methods *methods,
+ 	LDAPMessage *entry = NULL;
+ 	const char *trusted_dn;
+ 
+-	if (!get_trusteddom_pw_int(ldap_state, domain, &entry)) {
++	if (!get_trusteddom_pw_int(ldap_state, talloc_tos(), domain, &entry)) {
+ 		return False;
+ 	}
+ 
+@@ -5998,6 +6006,10 @@ static NTSTATUS ldapsam_enum_trusteddoms(struct pdb_methods *methods,
+ 			    attrsonly,
+ 			    &result);
+ 
++	if (result != NULL) {
++		talloc_autofree_ldapmsg(mem_ctx, result);
++	}
++
+ 	if (rc != LDAP_SUCCESS) {
+ 		return NT_STATUS_UNSUCCESSFUL;
+ 	}
+-- 
+1.6.0.4
+

Modified: branches/samba/lenny/debian/patches/series
===================================================================
--- branches/samba/lenny/debian/patches/series	2010-04-09 20:34:09 UTC (rev 3424)
+++ branches/samba/lenny/debian/patches/series	2010-04-10 04:59:56 UTC (rev 3425)
@@ -42,3 +42,4 @@
 security-CVE-2009-3297.patch
 security-CVE-2010-0547.patch
 bug_575951_upstream_6697.patch
+bug_538819_upstream_7021.patch





More information about the Pkg-samba-maint mailing list