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

Karolin Seeger kseeger at samba.org
Mon Oct 15 03:38:29 MDT 2012


The branch, v3-5-test has been updated
       via  c13c6eb Fix bug #9117 - smbclient can't connect to a Windows 7 server using NTLMv2 (crypto code changes domain case).
      from  8013e2e s3-libsmb: Initialise ticket to ensure we do not invalid memory

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


- Log -----------------------------------------------------------------
commit c13c6eb11f49b1fd3b3be95c7265cf9c0738b4e8
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 24 15:54:07 2012 -0700

    Fix bug #9117 - smbclient can't connect to a Windows 7 server using NTLMv2 (crypto code changes domain case).
    
    Simple fix for 3.5.x, tested and confirmed as working by original reporter
    "Blohm, Guntram (I/FP-37, extern)" <extern.guntram.blohm at audi.de>.

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

Summary of changes:
 libcli/auth/smbencrypt.c    |    5 ++++-
 source3/libsmb/cliconnect.c |    1 +
 2 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index f7c60e7..e821dbc 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -471,8 +471,11 @@ bool SMBNTLMv2encrypt_hash(TALLOC_CTX *mem_ctx,
 	/* We don't use the NT# directly.  Instead we use it mashed up with
 	   the username and domain.
 	   This prevents username swapping during the auth exchange
+	   NB. *DON'T* tell ntv2_owf_gen() to uppercase the domain
+	   name here, we may have already been added to an NTLMSSP
+	   exchange in the non-uppercase form.
 	*/
-	if (!ntv2_owf_gen(nt_hash, user, domain, true, ntlm_v2_hash)) {
+	if (!ntv2_owf_gen(nt_hash, user, domain, false, ntlm_v2_hash)) {
 		return false;
 	}
 
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index e858280..7b00469 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1178,6 +1178,7 @@ NTSTATUS cli_session_setup(struct cli_state *cli,
 	    (p=strchr_m(user2,*lp_winbind_separator()))) {
 		*p = 0;
 		user = p+1;
+		strupper_m(user2);
 		workgroup = user2;
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list