s3:smbd: pass smbXsrv_connection to is_valid_writeX_buffer()
authorStefan Metzmacher <metze@samba.org>
Wed, 11 Jun 2014 12:35:55 +0000 (14:35 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 6 Aug 2014 07:51:13 +0000 (09:51 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/smbd/process.c
source3/smbd/proto.h
source3/smbd/reply.c

index 8a57b539bc072cca67000ba094cd3cda4e30184c..66cb95f85a48759bf1d5489b4608aa51ea42ec10 100644 (file)
@@ -370,6 +370,7 @@ static NTSTATUS receive_smb_raw_talloc_partial_read(TALLOC_CTX *mem_ctx,
                                                    size_t *p_unread,
                                                    size_t *len_ret)
 {
+       struct smbXsrv_connection *xconn = sconn->conn;
        /* Size of a WRITEX call (+4 byte len). */
        char writeX_header[4 + STANDARD_WRITE_AND_X_HEADER_SIZE];
        ssize_t len = smb_len_large(lenbuf); /* Could be a UNIX large writeX. */
@@ -398,7 +399,7 @@ static NTSTATUS receive_smb_raw_talloc_partial_read(TALLOC_CTX *mem_ctx,
         * valid writeX call.
         */
 
-       if (is_valid_writeX_buffer(sconn, (uint8_t *)writeX_header)) {
+       if (is_valid_writeX_buffer(xconn, (uint8_t *)writeX_header)) {
                /*
                 * If the data offset is beyond what
                 * we've read, drain the extra bytes.
index 3dea578a262d1f3d8b814f5b62b9482d55364b25..a44d1bd7884d8aa1927d7b32a0ff801a268c978f 100644 (file)
@@ -869,7 +869,7 @@ void error_to_writebrawerr(struct smb_request *req);
 void reply_writebraw(struct smb_request *req);
 void reply_writeunlock(struct smb_request *req);
 void reply_write(struct smb_request *req);
-bool is_valid_writeX_buffer(struct smbd_server_connection *sconn,
+bool is_valid_writeX_buffer(struct smbXsrv_connection *xconn,
                            const uint8_t *inbuf);
 void reply_write_and_X(struct smb_request *req);
 void reply_lseek(struct smb_request *req);
index 22e06f2c79fae665d09e9536f164e49567afd022..5371537b05f193129544fec6acb6d7398925fc5e 100644 (file)
@@ -4617,7 +4617,7 @@ strict_unlock:
                                                (2*14) + /* word count (including bcc) */ \
                                                1 /* pad byte */)
 
-bool is_valid_writeX_buffer(struct smbd_server_connection *sconn,
+bool is_valid_writeX_buffer(struct smbXsrv_connection *xconn,
                            const uint8_t *inbuf)
 {
        size_t numtowrite;
@@ -4646,7 +4646,7 @@ bool is_valid_writeX_buffer(struct smbd_server_connection *sconn,
        }
 
        fnum = SVAL(inbuf, smb_vwv2);
-       status = smb1srv_open_lookup(sconn->conn,
+       status = smb1srv_open_lookup(xconn,
                                     fnum,
                                     0, /* now */
                                     &op);