From e5a951325a6cac8567af3a66de6d2df577508ae4 Mon Sep 17 00:00:00 2001 From: "Gerald (Jerry) Carter" Date: Wed, 10 Oct 2007 15:34:30 -0500 Subject: [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. (This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab) --- source3/smbd/reply.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'source3/smbd/reply.c') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index e27272f0dd..7c44216aea 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -402,7 +402,7 @@ void reply_special(char *inbuf) memset(outbuf, '\0', sizeof(outbuf)); - smb_setlen(inbuf,outbuf,0); + smb_setlen(outbuf,0); switch (msg_type) { case 0x81: /* session request */ @@ -1645,8 +1645,8 @@ void reply_open(connection_struct *conn, struct smb_request *req) if (!NT_STATUS_IS_OK(status)) { if (open_was_deferred(req->mid)) { - END_PROFILE(SMBopen); /* We have re-scheduled this call. */ + END_PROFILE(SMBopen); return; } reply_openerror(req, status); @@ -2040,7 +2040,7 @@ void reply_mknew(connection_struct *conn, struct smb_request *req) /* We have re-scheduled this call. */ return; } - reply_nterror(req, status); + reply_openerror(req, status); return; } @@ -3017,7 +3017,7 @@ Returning short read of maximum allowed for compatibility with Windows 2000.\n", return; } - set_message(NULL, (char *)req->outbuf, 5, nread+3, False); + set_message((char *)req->outbuf, 5, nread+3, False); SSVAL(req->outbuf,smb_vwv0,nread); SSVAL(req->outbuf,smb_vwv5,nread+3); @@ -3104,7 +3104,7 @@ Returning short read of maximum allowed for compatibility with Windows 2000.\n", return; } - set_message(NULL, (char *)req->outbuf, 5, nread+3, False); + set_message((char *)req->outbuf, 5, nread+3, False); SSVAL(req->outbuf,smb_vwv0,nread); SSVAL(req->outbuf,smb_vwv5,nread+3); @@ -3122,14 +3122,12 @@ Returning short read of maximum allowed for compatibility with Windows 2000.\n", Setup readX header. ****************************************************************************/ -static int setup_readX_header(const uint8 *inbuf, uint8 *outbuf, - size_t smb_maxcnt) +static int setup_readX_header(char *outbuf, size_t smb_maxcnt) { int outsize; char *data; - outsize = set_message((char *)inbuf, (char *)outbuf,12,smb_maxcnt, - False); + outsize = set_message(outbuf,12,smb_maxcnt,False); data = smb_buf(outbuf); memset(outbuf+smb_vwv0,'\0',24); /* valgrind init. */ @@ -3192,7 +3190,7 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req, header = data_blob_const(headerbuf, sizeof(headerbuf)); construct_reply_common((char *)req->inbuf, (char *)headerbuf); - setup_readX_header(req->inbuf, headerbuf, smb_maxcnt); + setup_readX_header((char *)headerbuf, smb_maxcnt); if ((nread = SMB_VFS_SENDFILE( smbd_server_fd(), fsp, fsp->fh->fd, &header, startpos, smb_maxcnt)) == -1) { /* Returning ENOSYS means no data at all was sent. Do this as a normal read. */ @@ -3243,7 +3241,7 @@ normal_read: uint8 headerbuf[smb_size + 2*12]; construct_reply_common((char *)req->inbuf, (char *)headerbuf); - setup_readX_header(req->inbuf, headerbuf, smb_maxcnt); + setup_readX_header((char *)headerbuf, smb_maxcnt); /* Send out the header. */ if (write_data(smbd_server_fd(), (char *)headerbuf, @@ -3270,7 +3268,7 @@ normal_read: return; } - setup_readX_header(req->inbuf, req->outbuf, nread); + setup_readX_header((char *)req->outbuf, nread); DEBUG( 3, ( "send_file_readX fnum=%d max=%d nread=%d\n", fsp->fnum, (int)smb_maxcnt, (int)nread ) ); @@ -3334,8 +3332,8 @@ void reply_read_and_X(connection_struct *conn, struct smb_request *req) END_PROFILE(SMBreadX); return; } - /* We currently don't do this on signed or sealed data. */ - if (srv_is_signing_active() || srv_encryption_on()) { + /* We currently don't do this on signed data. */ + if (srv_is_signing_active()) { reply_nterror(req, NT_STATUS_NOT_SUPPORTED); END_PROFILE(SMBreadX); return; @@ -3526,7 +3524,7 @@ void reply_writebraw(connection_struct *conn, struct smb_request *req) * it to send more bytes */ memcpy(buf, req->inbuf, smb_size); - outsize = set_message(NULL,buf, + outsize = set_message(buf, Protocol>PROTOCOL_COREPLUS?1:0,0,True); SCVAL(buf,smb_com,SMBwritebraw); SSVALS(buf,smb_vwv0,0xFFFF); -- cgit