[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Sat Jun 16 00:00:03 MDT 2012


The branch, master has been updated
       via  bbb7cbf Same fix as bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params
       via  816c40c Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params
       via  985dbed s3: Slightly simplify grant_fsp_oplock_type
      from  d1d36d2 s4-selftest: Add tests for dbcheck on an old database that needs repair

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


- Log -----------------------------------------------------------------
commit bbb7cbfb7cdf5cbd9700cdfaced9e7582de9eff5
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jun 15 21:10:59 2012 -0700

    Same fix as bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params
    
    for the Trans2 calls. See MS-CIFS 2.2.4.47.2 for details.
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Jun 16 07:59:19 CEST 2012 on sn-devel-104

commit 816c40cb0d6cfa39690e5a9ccca914c731f898a3
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jun 15 21:10:37 2012 -0700

    Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params
    
    Found by Richard Sharpe <realrichardsharpe at gmail.com>. The correct
    command code in a reply to NT Transact Secondary (0xa1) is
    NT Transact (0xa0).

commit 985dbedf2764b63048d4ae7a2fd319b1e3560229
Author: Volker Lendecke <vl at samba.org>
Date:   Wed May 30 11:28:19 2012 +0200

    s3: Slightly simplify grant_fsp_oplock_type
    
    The "else" is not necessary, we did a return in the if-branch
    
    Signed-off-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 source3/smbd/nttrans.c |    6 ++++++
 source3/smbd/open.c    |    4 +++-
 source3/smbd/trans2.c  |    9 +++++++++
 3 files changed, 18 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 3721125..5410fcb 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -2928,6 +2928,12 @@ void reply_nttranss(struct smb_request *req)
 
 	show_msg((const char *)req->inbuf);
 
+	/* Windows clients expect all replies to
+	   an NT transact secondary (SMBnttranss 0xA1)
+	   to have a command code of NT transact
+	   (SMBnttrans 0xA0). See bug #8989 for details. */
+	req->cmd = SMBnttrans;
+
 	if (req->wct < 18) {
 		reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
 		END_PROFILE(SMBnttranss);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 8fa28be..26d6971 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1283,7 +1283,9 @@ static void grant_fsp_oplock_type(files_struct *fsp,
 		DEBUG(10,("grant_fsp_oplock_type: oplock type 0x%x on file %s\n",
 			fsp->oplock_type, fsp_str_dbg(fsp)));
 		return;
-	} else if (lp_locking(fsp->conn->params) && file_has_brlocks(fsp)) {
+	}
+
+	if (lp_locking(fsp->conn->params) && file_has_brlocks(fsp)) {
 		DEBUG(10,("grant_fsp_oplock_type: file %s has byte range locks\n",
 			fsp_str_dbg(fsp)));
 		fsp->oplock_type = NO_OPLOCK;
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index a093575..3a13cd2 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -8870,6 +8870,15 @@ void reply_transs2(struct smb_request *req)
 
 	show_msg((const char *)req->inbuf);
 
+	/* Windows clients expect all replies to
+	   a transact secondary (SMBtranss2 0x33)
+	   to have a command code of transact
+	   (SMBtrans2 0x32). See bug #8989
+	   and also [MS-CIFS] section 2.2.4.47.2
+	   for details.
+	*/
+	req->cmd = SMBtrans2;
+
 	if (req->wct < 8) {
 		reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
 		END_PROFILE(SMBtranss2);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list