[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-701-g194c464

Gerald (Jerry) Carter jerry at samba.org
Mon Dec 17 23:34:39 GMT 2007


The branch, v3-2-test has been updated
       via  194c4640b158457a6d0d5ea91e28d41d619c77de (commit)
      from  7f6593cddef048dd05140b05d306c708d8134f0e (commit)

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


- Log -----------------------------------------------------------------
commit 194c4640b158457a6d0d5ea91e28d41d619c77de
Author: Gerald (Jerry) Carter <jerry at samba.org>
Date:   Mon Dec 17 17:33:48 2007 -0600

    Fix a segv in winbindd caused by trying to free an fstring.
    Make a copy of the machine_password and machine_account strings
    in all conditional paths so that SAFE_FREE() will always be valid.

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

Summary of changes:
 source/winbindd/winbindd_cm.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c
index cb366a2..6c5633c 100644
--- a/source/winbindd/winbindd_cm.c
+++ b/source/winbindd/winbindd_cm.c
@@ -2005,11 +2005,15 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
 		domain_name = domain->name;
 		goto schannel;
 	} else {
-		machine_password = conn_pwd;
-		machine_account = conn->cli->user_name;
+		machine_password = SMB_STRDUP(conn_pwd);		
+		machine_account = SMB_STRDUP(conn->cli->user_name);
 		domain_name = conn->cli->domain;
 	}
 
+	if (!machine_password || !machine_account) {
+		result = NT_STATUS_NO_MEMORY;
+		goto done;
+	}
 
 	/* We have an authenticated connection. Use a NTLMSSP SPNEGO
 	   authenticated SAMR pipe with sign & seal. */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list