[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Tue May 29 05:58:05 MDT 2012


The branch, master has been updated
       via  9102ccf s4:torture report connection error via torture_fail
       via  aa7cd05 s3:smbd/smb2_find add a debug message
       via  1bd3c0a s3:smbd/smb2_getinfo add a debug message
       via  f94d3d1 s3:smbd/smb2_setinfo add a debug message
       via  ac6417d s3:smbd/smb2_read improve debug message
       via  f61c241 libcli/smb: add some more FSCTL_* defines
       via  244cf05 s3:smb2cli_ioctl: fix requests without output_buffer.length > 0 against windows
      from  3085225 s3: fix compile of krb5 locator on Solaris

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


- Log -----------------------------------------------------------------
commit 9102ccf648e4f1fb4c20fc3aece45364e94294e0
Author: Christian Ambach <ambi at samba.org>
Date:   Thu May 10 14:51:13 2012 +0200

    s4:torture report connection error via torture_fail
    
    to make smbtorture report the error instead of complaining about missing torture_ call
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Tue May 29 13:57:42 CEST 2012 on sn-devel-104

commit aa7cd05e5b2efc45985a92c9f329099d40516876
Author: Christian Ambach <ambi at samba.org>
Date:   Fri May 11 19:03:50 2012 +0200

    s3:smbd/smb2_find add a debug message
    
    like the ones in the other calls that check for max sizes
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 1bd3c0aefbaa3ee78b9a4bcae97d2a4b5d09d76b
Author: Christian Ambach <ambi at samba.org>
Date:   Fri May 11 19:03:32 2012 +0200

    s3:smbd/smb2_getinfo add a debug message
    
    like the ones in the other calls that check for max sizes
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit f94d3d17e8a4ee7df0f1a8a95a23b4d6de40c089
Author: Christian Ambach <ambi at samba.org>
Date:   Fri May 11 19:02:21 2012 +0200

    s3:smbd/smb2_setinfo add a debug message
    
    similar to the ones present in other paths
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit ac6417dfc6f0571dfb357d131222daf054abe7e6
Author: Christian Ambach <ambi at samba.org>
Date:   Fri May 11 19:01:43 2012 +0200

    s3:smbd/smb2_read improve debug message
    
    make the message similar to the ones in other paths
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit f61c24166e2b98a1ac1ee6ad76b82050b39faccf
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue May 29 10:08:51 2012 +0200

    libcli/smb: add some more FSCTL_* defines
    
    metze

commit 244cf059f09fcbf7d5a85c97deed8f94756e8a4a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue May 29 07:27:14 2012 +0200

    s3:smb2cli_ioctl: fix requests without output_buffer.length > 0 against windows
    
    This fixes DCERPC over SMB2 against windows servers.
    
    metze

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

Summary of changes:
 libcli/smb/smb2cli_ioctl.c  |    2 +-
 libcli/smb/smb_constants.h  |    8 ++++++++
 source3/smbd/smb2_find.c    |    4 ++++
 source3/smbd/smb2_getinfo.c |    8 ++++++++
 source3/smbd/smb2_read.c    |    3 ++-
 source3/smbd/smb2_setinfo.c |    4 ++++
 source4/torture/smb2/smb2.c |    9 ++++++++-
 7 files changed, 35 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/smb/smb2cli_ioctl.c b/libcli/smb/smb2cli_ioctl.c
index 2881c74..9836469 100644
--- a/libcli/smb/smb2cli_ioctl.c
+++ b/libcli/smb/smb2cli_ioctl.c
@@ -77,7 +77,7 @@ struct tevent_req *smb2cli_ioctl_send(TALLOC_CTX *mem_ctx,
 
 	if (in_output_buffer) {
 		output_buffer_offset = SMB2_HDR_BODY+0x38;
-		if (input_buffer_length > 0) {
+		if (input_buffer_length > 0 && output_buffer_length > 0) {
 			uint32_t tmp;
 			output_buffer_offset += input_buffer_length;
 			tmp = output_buffer_offset;
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 4b7d1f2..aaf87c1 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -356,6 +356,7 @@ enum csc_policy {
 
 #define FSCTL_DFS			0x00060000
 #define FSCTL_DFS_GET_REFERRALS		(FSCTL_DFS | FSCTL_ACCESS_ANY | 0x0194 | FSCTL_METHOD_BUFFERED)
+#define FSCTL_DFS_GET_REFERRALS_EX	(FSCTL_DFS | FSCTL_ACCESS_ANY | 0x01B0 | FSCTL_METHOD_BUFFERED)
 
 #define FSCTL_FILESYSTEM		0x00090000
 #define FSCTL_REQUEST_OPLOCK_LEVEL_1    (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0000 | FSCTL_METHOD_BUFFERED)
@@ -377,6 +378,9 @@ enum csc_policy {
 #define FSCTL_CREATE_OR_GET_OBJECT_ID	(FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00C0 | FSCTL_METHOD_BUFFERED)
 #define FSCTL_SET_SPARSE		(FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00C4 | FSCTL_METHOD_BUFFERED)
 #define FSCTL_QUERY_ALLOCATED_RANGES	(FSCTL_FILESYSTEM | FSCTL_ACCESS_READ | 0x00CC | FSCTL_METHOD_NEITHER)
+#define FSCTL_FILE_LEVEL_TRIM		(FSCTL_FILESYSTEM | FSCTL_ACCESS_WRITE | 0x0208 | FSCTL_METHOD_BUFFERED)
+#define FSCTL_OFFLOAD_READ		(FSCTL_FILESYSTEM | FSCTL_ACCESS_READ | 0x0264 | FSCTL_METHOD_BUFFERED)
+#define FSCTL_OFFLOAD_WRITE		(FSCTL_FILESYSTEM | FSCTL_ACCESS_WRITE | 0x0268 | FSCTL_METHOD_BUFFERED)
 
 #define FSCTL_NAMED_PIPE		0x00110000
 #define FSCTL_PIPE_PEEK			(FSCTL_NAMED_PIPE | FSCTL_ACCESS_READ | 0x000C | FSCTL_METHOD_BUFFERED)
@@ -393,6 +397,10 @@ enum csc_policy {
 #define FSCTL_SRV_COPYCHUNK_WRITE	(FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_WRITE | 0x00F0 | FSCTL_METHOD_OUT_DIRECT)
 #define FSCTL_SRV_READ_HASH		(FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_READ| 0x01B8 | FSCTL_METHOD_NEITHER)
 #define FSCTL_LMR_REQ_RESILIENCY	(FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_ANY | 0x01D4 | FSCTL_METHOD_BUFFERED)
+#define FSCTL_LMR_SET_LINK_TRACKING_INFORMATION \
+	(FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00EC | FSCTL_METHOD_BUFFERED)
+#define FSCTL_QUERY_NETWORK_INTERFACE_INFO \
+	(FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_ANY | 0x01FC | FSCTL_METHOD_BUFFERED)
 
 /*
  * FSCTL_VALIDATE_NEGOTIATE_INFO_224 was used used in
diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c
index 9c0d18b..eb22118 100644
--- a/source3/smbd/smb2_find.c
+++ b/source3/smbd/smb2_find.c
@@ -278,6 +278,10 @@ static struct tevent_req *smbd_smb2_find_send(TALLOC_CTX *mem_ctx,
 	}
 
 	if (in_output_buffer_length > smb2req->sconn->smb2.max_trans) {
+		DEBUG(2,("smbd_smb2_find_send: "
+			 "client ignored max trans:%s: 0x%08X: 0x%08X\n",
+			 __location__, in_output_buffer_length,
+			 smb2req->sconn->smb2.max_trans));
 		tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
 		return tevent_req_post(req, ev);
 	}
diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c
index e8d918d..0f59365 100644
--- a/source3/smbd/smb2_getinfo.c
+++ b/source3/smbd/smb2_getinfo.c
@@ -91,9 +91,17 @@ NTSTATUS smbd_smb2_request_process_getinfo(struct smbd_smb2_request *req)
 	in_input_buffer.length = in_input_buffer_length;
 
 	if (in_input_buffer.length > req->sconn->smb2.max_trans) {
+		DEBUG(2,("smbd_smb2_request_process_getinfo: "
+			 "client ignored max trans: %s: 0x%08X: 0x%08X\n",
+			 __location__, in_input_buffer.length,
+			 req->sconn->smb2.max_trans));
 		return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
 	}
 	if (in_output_buffer_length > req->sconn->smb2.max_trans) {
+		DEBUG(2,("smbd_smb2_request_process_getinfo: "
+			 "client ignored max trans: %s: 0x%08X: 0x%08X\n",
+			 __location__, in_output_buffer_length,
+			 req->sconn->smb2.max_trans));
 		return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
 	}
 
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c
index b36c3cb..d69ead9 100644
--- a/source3/smbd/smb2_read.c
+++ b/source3/smbd/smb2_read.c
@@ -75,7 +75,8 @@ NTSTATUS smbd_smb2_request_process_read(struct smbd_smb2_request *req)
 
 	/* check the max read size */
 	if (in_length > req->sconn->smb2.max_read) {
-		DEBUG(0,("here:%s: 0x%08X: 0x%08X\n",
+		DEBUG(2,("smbd_smb2_request_process_read: "
+			 "client ignored max read: %s: 0x%08X: 0x%08X\n",
 			__location__, in_length, req->sconn->smb2.max_read));
 		return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
 	}
diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c
index be506cc..d864bb2 100644
--- a/source3/smbd/smb2_setinfo.c
+++ b/source3/smbd/smb2_setinfo.c
@@ -82,6 +82,10 @@ NTSTATUS smbd_smb2_request_process_setinfo(struct smbd_smb2_request *req)
 	in_input_buffer.length = in_input_buffer_length;
 
 	if (in_input_buffer.length > req->sconn->smb2.max_trans) {
+		DEBUG(2,("smbd_smb2_request_process_setinfo: "
+			 "client ignored max trans: %s: 0x%08X: 0x%08X\n",
+			 __location__, in_input_buffer.length,
+			 req->sconn->smb2.max_trans));
 		return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
 	}
 
diff --git a/source4/torture/smb2/smb2.c b/source4/torture/smb2/smb2.c
index 9ea71b4..a396a2e 100644
--- a/source4/torture/smb2/smb2.c
+++ b/source4/torture/smb2/smb2.c
@@ -33,8 +33,11 @@ static bool wrap_simple_1smb2_test(struct torture_context *torture_ctx,
 	struct smb2_tree *tree1;
 	TALLOC_CTX *mem_ctx = talloc_new(torture_ctx);
 
-	if (!torture_smb2_connection(torture_ctx, &tree1))
+	if (!torture_smb2_connection(torture_ctx, &tree1)) {
+		torture_fail(torture_ctx,
+			    "Establishing SMB2 connection failed\n");
 		return false;
+	}
 
 	/*
 	 * This is a trick:
@@ -89,12 +92,16 @@ static bool wrap_simple_2smb2_test(struct torture_context *torture_ctx,
 	TALLOC_CTX *mem_ctx = talloc_new(torture_ctx);
 
 	if (!torture_smb2_connection(torture_ctx, &tree1)) {
+		torture_fail(torture_ctx,
+		    "Establishing SMB2 connection failed\n");
 		goto done;
 	}
 
 	talloc_steal(mem_ctx, tree1);
 
 	if (!torture_smb2_connection(torture_ctx, &tree2)) {
+		torture_fail(torture_ctx,
+		    "Establishing SMB2 connection failed\n");
 		goto done;
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list