[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1231-gd66b6c3

Stefan Metzmacher metze at samba.org
Fri Mar 7 11:11:28 GMT 2008


The branch, v4-0-test has been updated
       via  d66b6c3823f003875e3b7cdf63617a894cceadf9 (commit)
      from  d331bc400fb138bc43be88d0ca8ab3bcd590d2cd (commit)

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


- Log -----------------------------------------------------------------
commit d66b6c3823f003875e3b7cdf63617a894cceadf9
Author: Amin Azez <azez at ufomechanic.net>
Date:   Fri Mar 7 10:55:49 2008 +0000

    Use 32 bit storage for nttrans counts
    
    Erroneous 16bit storage for nttrans counts meant that nttrans behaved
    "strangely" for sizes of over 64K
    
    As 32 bit is used in the SMB message and specified in
    http://us4.samba.org/samba/ftp/specs/draft-leach-cifs-v1-spec-02.txt
    section 3.13.2
    this fix changes storage to match.
    
    Signed-off-by: Amin Azez <azez at ufomechanic.net>

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

Summary of changes:
 source/smb_server/smb/nttrans.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smb_server/smb/nttrans.c b/source/smb_server/smb/nttrans.c
index f6edc40..a20c41b 100644
--- a/source/smb_server/smb/nttrans.c
+++ b/source/smb_server/smb/nttrans.c
@@ -460,7 +460,7 @@ static NTSTATUS nttrans_backend(struct smbsrv_request *req,
 static void reply_nttrans_send(struct ntvfs_request *ntvfs)
 {
 	struct smbsrv_request *req;
-	uint16_t params_left, data_left;
+	uint32_t params_left, data_left;
 	uint8_t *params, *data;
 	struct smb_nttrans *trans;
 	struct nttrans_op *op;
@@ -502,7 +502,7 @@ static void reply_nttrans_send(struct ntvfs_request *ntvfs)
 	/* we need to divide up the reply into chunks that fit into
 	   the negotiated buffer size */
 	do {
-		uint16_t this_data, this_param, max_bytes;
+		uint32_t this_data, this_param, max_bytes;
 		uint_t align1 = 1, align2 = (params_left ? 2 : 0);
 		struct smbsrv_request *this_req;
 
@@ -573,9 +573,9 @@ void smbsrv_reply_nttrans(struct smbsrv_request *req)
 {
 	struct nttrans_op *op;
 	struct smb_nttrans *trans;
-	uint16_t param_ofs, data_ofs;
-	uint16_t param_count, data_count;
-	uint16_t param_total, data_total;
+	uint32_t param_ofs, data_ofs;
+	uint32_t param_count, data_count;
+	uint32_t param_total, data_total;
 
 	/* parse request */
 	if (req->in.wct < 19) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list