summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-10-03 18:11:37 +0200
committerVolker Lendecke <vl@samba.org>2010-10-14 13:53:07 +0200
commita2db154caa104c9606e343391ff9ffe33f1610a7 (patch)
treedce2d0153fe41e75529da0e7bd502ba61fce8406
parentfa0de39551323bbc57998956de1be382e1f20134 (diff)
downloadsamba-a2db154caa104c9606e343391ff9ffe33f1610a7.tar.gz
samba-a2db154caa104c9606e343391ff9ffe33f1610a7.tar.bz2
samba-a2db154caa104c9606e343391ff9ffe33f1610a7.zip
s3: Lift smbd_server_conn from receive_smb_raw_talloc
-rw-r--r--source3/smbd/process.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 35382316fc..d776ff0377 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -356,7 +356,8 @@ static NTSTATUS receive_smb_raw_talloc_partial_read(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
-static NTSTATUS receive_smb_raw_talloc(TALLOC_CTX *mem_ctx, int fd,
+static NTSTATUS receive_smb_raw_talloc(TALLOC_CTX *mem_ctx,
+ struct smbd_server_connection *sconn,
char **buffer, unsigned int timeout,
size_t *p_unread, size_t *plen)
{
@@ -367,7 +368,8 @@ static NTSTATUS receive_smb_raw_talloc(TALLOC_CTX *mem_ctx, int fd,
*p_unread = 0;
- status = read_smb_length_return_keepalive(fd, lenbuf, timeout, &len);
+ status = read_smb_length_return_keepalive(sconn->sock, lenbuf, timeout,
+ &len);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -375,11 +377,11 @@ static NTSTATUS receive_smb_raw_talloc(TALLOC_CTX *mem_ctx, int fd,
if (CVAL(lenbuf,0) == 0 && min_recv_size &&
(smb_len_large(lenbuf) > /* Could be a UNIX large writeX. */
(min_recv_size + STANDARD_WRITE_AND_X_HEADER_SIZE)) &&
- !srv_is_signing_active(smbd_server_conn) &&
- smbd_server_conn->smb1.echo_handler.trusted_fde == NULL) {
+ !srv_is_signing_active(sconn) &&
+ sconn->smb1.echo_handler.trusted_fde == NULL) {
return receive_smb_raw_talloc_partial_read(
- mem_ctx, lenbuf, smbd_server_conn, buffer, timeout,
+ mem_ctx, lenbuf, sconn, buffer, timeout,
p_unread, plen);
}
@@ -401,7 +403,7 @@ static NTSTATUS receive_smb_raw_talloc(TALLOC_CTX *mem_ctx, int fd,
memcpy(*buffer, lenbuf, sizeof(lenbuf));
- status = read_packet_remainder(fd, (*buffer)+4, timeout, len);
+ status = read_packet_remainder(sconn->sock, (*buffer)+4, timeout, len);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -422,8 +424,8 @@ static NTSTATUS receive_smb_talloc(TALLOC_CTX *mem_ctx, int fd,
*p_encrypted = false;
- status = receive_smb_raw_talloc(mem_ctx, fd, buffer, timeout,
- p_unread, &len);
+ status = receive_smb_raw_talloc(mem_ctx, smbd_server_conn, buffer,
+ timeout, p_unread, &len);
if (!NT_STATUS_IS_OK(status)) {
char addr[INET6_ADDRSTRLEN];
DEBUG(1, ("read_smb_length_return_keepalive failed for "