[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Mon May 23 04:16:03 MDT 2011


The branch, master has been updated
       via  28d7282 s3: Remove unused cli_[en|de]crypt_message
       via  1a393b7 s3: Directly call common_encrypt_buffer in cli_smb_req_iov_send
      from  df0e330 s3: Remove cli_send/receive_smb

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 28d728273834e740e15d32a9eedec8c8760abae3
Author: Volker Lendecke <vl at samba.org>
Date:   Sun May 22 19:14:44 2011 +0200

    s3: Remove unused cli_[en|de]crypt_message
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Mon May 23 12:15:33 CEST 2011 on sn-devel-104

commit 1a393b7cd6bb2cffd4618932fc96367f6b2bb9dd
Author: Volker Lendecke <vl at samba.org>
Date:   Sun May 22 19:13:19 2011 +0200

    s3: Directly call common_encrypt_buffer in cli_smb_req_iov_send

-----------------------------------------------------------------------

Summary of changes:
 source3/libsmb/async_smb.c |    4 ++--
 source3/libsmb/proto.h     |    2 --
 source3/libsmb/smb_seal.c  |   43 -------------------------------------------
 3 files changed, 2 insertions(+), 47 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index dfab82a..3ed3871 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -414,8 +414,8 @@ static NTSTATUS cli_smb_req_iov_send(struct tevent_req *req,
 		if (buf == NULL) {
 			return NT_STATUS_NO_MEMORY;
 		}
-		status = cli_encrypt_message(state->cli, (char *)buf,
-					     &enc_buf);
+		status = common_encrypt_buffer(state->cli->trans_enc_state,
+					       (char *)buf, &enc_buf);
 		TALLOC_FREE(buf);
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(0, ("Error in encrypting client message: %s\n",
diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h
index 089a88a..923dd38 100644
--- a/source3/libsmb/proto.h
+++ b/source3/libsmb/proto.h
@@ -811,8 +811,6 @@ void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf);
 bool cli_encryption_on(struct cli_state *cli);
 void cli_free_encryption_context(struct cli_state *cli);
 void cli_free_enc_buffer(struct cli_state *cli, char *buf);
-NTSTATUS cli_decrypt_message(struct cli_state *cli);
-NTSTATUS cli_encrypt_message(struct cli_state *cli, char *buf, char **buf_out);
 
 /* The following definitions come from libsmb/clisigning.c  */
 
diff --git a/source3/libsmb/smb_seal.c b/source3/libsmb/smb_seal.c
index 5426c8d..73786ac 100644
--- a/source3/libsmb/smb_seal.c
+++ b/source3/libsmb/smb_seal.c
@@ -465,46 +465,3 @@ void cli_free_enc_buffer(struct cli_state *cli, char *buf)
 	 */
 	common_free_enc_buffer(cli->trans_enc_state, buf);
 }
-
-/******************************************************************************
- Decrypt an incoming buffer.
-******************************************************************************/
-
-NTSTATUS cli_decrypt_message(struct cli_state *cli)
-{
-	NTSTATUS status;
-	uint16 enc_ctx_num;
-
-	/* Ignore non-session messages. */
-	if(CVAL(cli->inbuf,0)) {
-		return NT_STATUS_OK;
-	}
-
-	status = get_enc_ctx_num((const uint8_t *)cli->inbuf, &enc_ctx_num);
-	if (!NT_STATUS_IS_OK(status)) {
-		return status;
-	}
-
-	if (enc_ctx_num != cli->trans_enc_state->enc_ctx_num) {
-		return NT_STATUS_INVALID_HANDLE;
-	}
-
-	return common_decrypt_buffer(cli->trans_enc_state, cli->inbuf);
-}
-
-/******************************************************************************
- Encrypt an outgoing buffer. Return the encrypted pointer in buf_out.
-******************************************************************************/
-
-NTSTATUS cli_encrypt_message(struct cli_state *cli, char *buf, char **buf_out)
-{
-	/* Ignore non-session messages. */
-	if (CVAL(buf,0)) {
-		return NT_STATUS_OK;
-	}
-
-	/* If we supported multiple encrytion contexts
-	 * here we'd look up based on tid.
-	 */
-	return common_encrypt_buffer(cli->trans_enc_state, buf, buf_out);
-}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list