[SCM] Samba Shared Repository - branch v3-4-test updated

Karolin Seeger kseeger at samba.org
Wed Oct 14 02:29:49 MDT 2009


The branch, v3-4-test has been updated
       via  0fc6494... s3:winbind: Fix a double-free
       via  2e478cc... s3:winbind: Fix bug 6793 -- segfault in winbindd_pam_auth
      from  aa5a431... s3:net: Fix a segfault in "net rpc trustdom list" for overlong domain names

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


- Log -----------------------------------------------------------------
commit 0fc64947526f4eea896fd83b01194e40416d15f4
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Oct 13 20:56:28 2009 +0200

    s3:winbind: Fix a double-free
    
    Part of a fix for bug #6793.

commit 2e478cc8c31bc60325a8e01885222d1db29ca21c
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Oct 9 22:05:37 2009 +0200

    s3:winbind: Fix bug 6793 -- segfault in winbindd_pam_auth

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

Summary of changes:
 source3/winbindd/idmap_adex/provider_unified.c |    1 -
 source3/winbindd/winbindd_pam.c                |   13 ++++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap_adex/provider_unified.c b/source3/winbindd/idmap_adex/provider_unified.c
index f9d73f5..07899ec 100644
--- a/source3/winbindd/idmap_adex/provider_unified.c
+++ b/source3/winbindd/idmap_adex/provider_unified.c
@@ -439,7 +439,6 @@ done:
 	}
 
 	talloc_destroy(frame);
-	TALLOC_FREE(entry_dn);
 
 	return nt_status;
 }
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index dbf6f5b..1064ec5 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -810,8 +810,8 @@ static NTSTATUS append_data(struct winbindd_cli_state *state,
 void winbindd_pam_auth(struct winbindd_cli_state *state)
 {
 	struct winbindd_domain *domain;
-	fstring name_domain, name_user;
-	char *mapped_user = NULL;
+	fstring name_domain, name_user, mapped_user;
+	char *mapped = NULL;
 	NTSTATUS result;
 	NTSTATUS name_map_status = NT_STATUS_UNSUCCESSFUL;
 
@@ -835,15 +835,14 @@ void winbindd_pam_auth(struct winbindd_cli_state *state)
 
 	name_map_status = normalize_name_unmap(state->mem_ctx,
 					       state->request.data.auth.user,
-					       &mapped_user);
+					       &mapped);
 
 	/* If the name normalization didnt' actually do anything,
 	   just use the original name */
 
-	if (!NT_STATUS_IS_OK(name_map_status) &&
-	    !NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED))
-	{
-		mapped_user = state->request.data.auth.user;
+	if (NT_STATUS_IS_OK(name_map_status)
+	    ||NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED)) {
+		fstrcpy(mapped_user, mapped);
 	}
 
 	if (!canonicalize_username(mapped_user, name_domain, name_user)) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list