s3: Pass smbd_server_connection to srv_decrypt_buffer
authorVolker Lendecke <vl@samba.org>
Fri, 5 Aug 2011 14:58:51 +0000 (16:58 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 25 Aug 2011 19:36:19 +0000 (21:36 +0200)
source3/smbd/process.c
source3/smbd/proto.h
source3/smbd/seal.c

index c2ce867b6e3ed7ce838fc9d118d27aff8b11a64c..76f0e06cfee9ad18a3b2845c155838979b191d34 100644 (file)
@@ -465,7 +465,7 @@ static NTSTATUS receive_smb_talloc(TALLOC_CTX *mem_ctx,
        }
 
        if (is_encrypted_packet(sconn, (uint8_t *)*buffer)) {
-               status = srv_decrypt_buffer(*buffer);
+               status = srv_decrypt_buffer(sconn, *buffer);
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(0, ("receive_smb_talloc: SMB decryption failed on "
                                "incoming packet! Error %s\n",
index b8e955756070f2761e80bc58717a38a3410043bf..efbaa2ee8931456e0fef2f5c9b3a1d50435cf6b1 100644 (file)
@@ -48,7 +48,6 @@
 
 /* The following definitions come from smbd/signing.c  */
 
-struct smbd_server_connection;
 bool srv_check_sign_mac(struct smbd_server_connection *conn,
                        const char *inbuf, uint32_t *seqnum, bool trusted_channel);
 void srv_calculate_sign_mac(struct smbd_server_connection *conn,
@@ -940,7 +939,7 @@ void reply_getattrE(struct smb_request *req);
 bool is_encrypted_packet(struct smbd_server_connection *sconn,
                         const uint8_t *inbuf);
 void srv_free_enc_buffer(struct smbd_server_connection *sconn, char *buf);
-NTSTATUS srv_decrypt_buffer(char *buf);
+NTSTATUS srv_decrypt_buffer(struct smbd_server_connection *sconn, char *buf);
 NTSTATUS srv_encrypt_buffer(char *buf, char **buf_out);
 NTSTATUS srv_request_encryption_setup(connection_struct *conn,
                                        unsigned char **ppdata,
index 7ec8c2d75f6989da295bba4c9b297ba8f63ef94a..2883b4e55dfab899ca6808df3f5b409605d80c4d 100644 (file)
@@ -343,7 +343,7 @@ void srv_free_enc_buffer(struct smbd_server_connection *sconn, char *buf)
  Decrypt an incoming buffer.
 ******************************************************************************/
 
-NTSTATUS srv_decrypt_buffer(char *buf)
+NTSTATUS srv_decrypt_buffer(struct smbd_server_connection *sconn, char *buf)
 {
        /* Ignore non-session messages. */
        if(CVAL(buf,0)) {