summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-06-12 08:43:26 +0200
committerMichael Adam <obnox@samba.org>2014-08-06 09:51:14 +0200
commit245e3959de269110b837ff2ed2742b090a1566ae (patch)
tree7a78745ee770f38a56787d6f83510391e7ae1388
parentd9716cb0dba788ffd1ef36167038c71405df28c4 (diff)
downloadsamba-245e3959de269110b837ff2ed2742b090a1566ae.tar.gz
samba-245e3959de269110b837ff2ed2742b090a1566ae.tar.xz
samba-245e3959de269110b837ff2ed2742b090a1566ae.zip
s3:smbd: pass smbXsrv_connection to smb1 encryption functions
These parameters are not really used currently, but may be in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/smbd/process.c8
-rw-r--r--source3/smbd/proto.h8
-rw-r--r--source3/smbd/seal.c8
3 files changed, 12 insertions, 12 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 0f03d88e76..780a67aee5 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -240,7 +240,7 @@ bool srv_send_smb(struct smbd_server_connection *sconn, char *buffer,
}
if (do_encrypt) {
- NTSTATUS status = srv_encrypt_buffer(sconn, buffer, &buf_out);
+ NTSTATUS status = srv_encrypt_buffer(xconn, buffer, &buf_out);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("send_smb: SMB encryption failed "
"on outgoing packet! Error %s\n",
@@ -265,12 +265,12 @@ bool srv_send_smb(struct smbd_server_connection *sconn, char *buffer,
(int)ret, strerror(saved_errno)));
errno = saved_errno;
- srv_free_enc_buffer(sconn, buf_out);
+ srv_free_enc_buffer(xconn, buf_out);
goto out;
}
SMB_PERFCOUNT_SET_MSGLEN_OUT(pcd, len);
- srv_free_enc_buffer(sconn, buf_out);
+ srv_free_enc_buffer(xconn, buf_out);
out:
SMB_PERFCOUNT_END(pcd);
@@ -565,7 +565,7 @@ static NTSTATUS receive_smb_talloc(TALLOC_CTX *mem_ctx,
}
if (is_encrypted_packet((uint8_t *)*buffer)) {
- status = srv_decrypt_buffer(sconn, *buffer);
+ status = srv_decrypt_buffer(xconn, *buffer);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("receive_smb_talloc: SMB decryption failed on "
"incoming packet! Error %s\n",
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 453d829169..22cd921694 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -930,9 +930,9 @@ void reply_getattrE(struct smb_request *req);
/* The following definitions come from smbd/seal.c */
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,
+void srv_free_enc_buffer(struct smbXsrv_connection *xconn, char *buf);
+NTSTATUS srv_decrypt_buffer(struct smbXsrv_connection *xconn, char *buf);
+NTSTATUS srv_encrypt_buffer(struct smbXsrv_connection *xconn, char *buf,
char **buf_out);
NTSTATUS srv_request_encryption_setup(connection_struct *conn,
unsigned char **ppdata,
@@ -940,7 +940,7 @@ NTSTATUS srv_request_encryption_setup(connection_struct *conn,
unsigned char **pparam,
size_t *p_param_size);
NTSTATUS srv_encryption_start(connection_struct *conn);
-void server_encryption_shutdown(struct smbd_server_connection *sconn);
+void server_encryption_shutdown(struct smbXsrv_connection *xconn);
/* The following definitions come from smbd/sec_ctx.c */
diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c
index 7ab992ea7b..e088d749d4 100644
--- a/source3/smbd/seal.c
+++ b/source3/smbd/seal.c
@@ -134,7 +134,7 @@ static NTSTATUS make_srv_encryption_context(const struct tsocket_address *remote
Free an encryption-allocated buffer.
******************************************************************************/
-void srv_free_enc_buffer(struct smbd_server_connection *sconn, char *buf)
+void srv_free_enc_buffer(struct smbXsrv_connection *xconn, char *buf)
{
/* We know this is an smb buffer, and we
* didn't malloc, only copy, for a keepalive,
@@ -153,7 +153,7 @@ void srv_free_enc_buffer(struct smbd_server_connection *sconn, char *buf)
Decrypt an incoming buffer.
******************************************************************************/
-NTSTATUS srv_decrypt_buffer(struct smbd_server_connection *sconn, char *buf)
+NTSTATUS srv_decrypt_buffer(struct smbXsrv_connection *xconn, char *buf)
{
/* Ignore non-session messages. */
if(CVAL(buf,0)) {
@@ -171,7 +171,7 @@ NTSTATUS srv_decrypt_buffer(struct smbd_server_connection *sconn, char *buf)
Encrypt an outgoing buffer. Return the encrypted pointer in buf_out.
******************************************************************************/
-NTSTATUS srv_encrypt_buffer(struct smbd_server_connection *sconn, char *buf,
+NTSTATUS srv_encrypt_buffer(struct smbXsrv_connection *xconn, char *buf,
char **buf_out)
{
*buf_out = buf;
@@ -302,7 +302,7 @@ NTSTATUS srv_encryption_start(connection_struct *conn)
Shutdown all server contexts.
******************************************************************************/
-void server_encryption_shutdown(struct smbd_server_connection *sconn)
+void server_encryption_shutdown(struct smbXsrv_connection *xconn)
{
TALLOC_FREE(partial_srv_trans_enc_ctx);
TALLOC_FREE(srv_trans_enc_ctx);