[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Mon Sep 12 12:51:04 MDT 2011


The branch, master has been updated
       via  85332eb s3:libsmb: check the wct of the incoming SMBnegprot responses
      from  1dc3ac2 s3:libsmb: let cli_pull_raw_error() return NT_STATUS_OK as DOS-Error success

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 85332eb1c721d585e1a33101bddafdca4073e10f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 12 07:13:56 2011 +0200

    s3:libsmb: check the wct of the incoming SMBnegprot responses
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Mon Sep 12 20:50:27 CEST 2011 on sn-devel-104

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

Summary of changes:
 source3/libsmb/cliconnect.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index fd0536c..e0d2419 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2640,6 +2640,11 @@ static void cli_negprot_done(struct tevent_req *subreq)
 		struct timespec ts;
 		bool negotiated_smb_signing = false;
 
+		if (wct != 0x11) {
+			tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+			return;
+		}
+
 		/* NT protocol */
 		cli->sec_mode = CVAL(vwv + 1, 0);
 		cli->max_mux = SVAL(vwv + 1, 1);
@@ -2700,6 +2705,11 @@ static void cli_negprot_done(struct tevent_req *subreq)
 		}
 
 	} else if (cli_state_protocol(cli) >= PROTOCOL_LANMAN1) {
+		if (wct != 0x0D) {
+			tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+			return;
+		}
+
 		cli->use_spnego = False;
 		cli->sec_mode = SVAL(vwv + 1, 0);
 		cli->max_xmit = SVAL(vwv + 2, 0);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list