From 076055594df808006d66e527ae45d27e86fb13f4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 11 Jun 2014 14:28:13 +0200 Subject: [PATCH] s3:smbd: remove unused 'sconn' from is_encrypted_packet() Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Reviewed-by: Michael Adam --- source3/smbd/process.c | 4 ++-- source3/smbd/proto.h | 3 +-- source3/smbd/reply.c | 2 +- source3/smbd/seal.c | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 5f07275f15f..8caa7d2a7de 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -299,7 +299,7 @@ int srv_set_message(char *buf, static bool valid_smb_header(struct smbd_server_connection *sconn, const uint8_t *inbuf) { - if (is_encrypted_packet(sconn, inbuf)) { + if (is_encrypted_packet(inbuf)) { return true; } /* @@ -564,7 +564,7 @@ static NTSTATUS receive_smb_talloc(TALLOC_CTX *mem_ctx, return status; } - if (is_encrypted_packet(sconn, (uint8_t *)*buffer)) { + if (is_encrypted_packet((uint8_t *)*buffer)) { status = srv_decrypt_buffer(sconn, *buffer); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("receive_smb_talloc: SMB decryption failed on " diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 74c9950bed6..3dea578a262 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -927,8 +927,7 @@ void reply_getattrE(struct smb_request *req); /* The following definitions come from smbd/seal.c */ -bool is_encrypted_packet(struct smbd_server_connection *sconn, - const uint8_t *inbuf); +bool is_encrypted_packet(const uint8_t *inbuf); void srv_free_enc_buffer(struct smbd_server_connection *sconn, char *buf); NTSTATUS srv_decrypt_buffer(struct smbd_server_connection *sconn, char *buf); NTSTATUS srv_encrypt_buffer(struct smbd_server_connection *sconn, char *buf, diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 9722307f536..22e06f2c79f 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -4628,7 +4628,7 @@ bool is_valid_writeX_buffer(struct smbd_server_connection *sconn, struct files_struct *fsp = NULL; NTSTATUS status; - if (is_encrypted_packet(sconn, inbuf)) { + if (is_encrypted_packet(inbuf)) { /* Can't do this on encrypted * connections. */ return false; diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c index 273013b4279..7ab992ea7b1 100644 --- a/source3/smbd/seal.c +++ b/source3/smbd/seal.c @@ -45,8 +45,7 @@ static uint16_t srv_enc_ctx(const struct smb_trans_enc_state *es) Is this an incoming encrypted packet ? ******************************************************************************/ -bool is_encrypted_packet(struct smbd_server_connection *sconn, - const uint8_t *inbuf) +bool is_encrypted_packet(const uint8_t *inbuf) { NTSTATUS status; uint16_t enc_num; -- 2.11.4.GIT