[SCM] Samba Shared Repository - branch master updated - 6c019b875515662f5c97d89d653e2708478581ad

Volker Lendecke vlendec at samba.org
Wed Oct 22 15:53:58 GMT 2008


The branch, master has been updated
       via  6c019b875515662f5c97d89d653e2708478581ad (commit)
       via  84df0a68702dfd3ff687f199df4e479a892640d7 (commit)
      from  ca2d23e04822bb6389f744ff1885ad488c2671ff (commit)

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


- Log -----------------------------------------------------------------
commit 6c019b875515662f5c97d89d653e2708478581ad
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 22 17:01:28 2008 +0200

    Slightly simplify reply_sesssetup_blob(): Remove an else branch

commit 84df0a68702dfd3ff687f199df4e479a892640d7
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 22 16:59:08 2008 +0200

    Don't push the data out to the client in reply_sesssetup_blob()
    
    Sending the data at this level breaks the assumption at higher levels that
    req->outbuf == NULL means this request is deferred. It also breaks potential
    chaining (Kerberos session setup and tcon X in one request)

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

Summary of changes:
 source3/smbd/sesssetup.c |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 9c9d0a9..845bf75 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -125,21 +125,18 @@ static void reply_sesssetup_blob(struct smb_request *req,
 	if (!NT_STATUS_IS_OK(nt_status) &&
 	    !NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
 		reply_nterror(req, nt_status_squash(nt_status));
-	} else {
-		nt_status = nt_status_squash(nt_status);
-		SIVAL(req->outbuf, smb_rcls, NT_STATUS_V(nt_status));
-		SSVAL(req->outbuf, smb_vwv0, 0xFF); /* no chaining possible */
-		SSVAL(req->outbuf, smb_vwv3, blob.length);
-
-		if ((message_push_blob(&req->outbuf, blob) == -1)
-		    || (push_signature(&req->outbuf) == -1)) {
-			reply_nterror(req, NT_STATUS_NO_MEMORY);
-		}
+		return;
 	}
 
-	show_msg((char *)req->outbuf);
-	srv_send_smb(smbd_server_fd(),(char *)req->outbuf,req->encrypted);
-	TALLOC_FREE(req->outbuf);
+	nt_status = nt_status_squash(nt_status);
+	SIVAL(req->outbuf, smb_rcls, NT_STATUS_V(nt_status));
+	SSVAL(req->outbuf, smb_vwv0, 0xFF); /* no chaining possible */
+	SSVAL(req->outbuf, smb_vwv3, blob.length);
+
+	if ((message_push_blob(&req->outbuf, blob) == -1)
+	    || (push_signature(&req->outbuf) == -1)) {
+		reply_nterror(req, NT_STATUS_NO_MEMORY);
+	}
 }
 
 /****************************************************************************


-- 
Samba Shared Repository


More information about the samba-cvs mailing list