summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-09 21:09:28 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-09 21:09:28 +0000
commit2b6a6df0f65caccb31c78008539d24f8c4a2f72a (patch)
tree77d2d81d4ec0a6a8161d82d0f1be3fb0c99ba9e4
parent14cf457c567b16cf4a3725d3a3c7527593a4982a (diff)
downloadsamba-2b6a6df0f65caccb31c78008539d24f8c4a2f72a.tar.gz
samba-2b6a6df0f65caccb31c78008539d24f8c4a2f72a.tar.bz2
samba-2b6a6df0f65caccb31c78008539d24f8c4a2f72a.zip
Try not to clobber the session request.
(This used to be commit 05cffbee56f0556f550b4d14f3111bd7db972621)
-rw-r--r--source3/libsmb/smb_signing.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/source3/libsmb/smb_signing.c b/source3/libsmb/smb_signing.c
index b3a6351893..581d18fef7 100644
--- a/source3/libsmb/smb_signing.c
+++ b/source3/libsmb/smb_signing.c
@@ -208,8 +208,10 @@ void cli_simple_set_signing(struct cli_state *cli, const uchar user_session_key[
static void cli_null_sign_outgoing_message(struct cli_state *cli)
{
- static uchar zeros[8];
- memcpy(&cli->outbuf[smb_ss_field], zeros, sizeof(zeros));
+ /* we can't zero out the sig, as we might be trying to send a
+ session request - which is NBT-level, not SMB level and doesn't
+ have the feild */
+ return;
}
/***********************************************************
@@ -295,7 +297,7 @@ void cli_temp_set_signing(struct cli_state *cli)
}
/**
- * Free the singing context
+ * Free the singing context
*/
void cli_free_signing_context(struct cli_state *cli)
@@ -306,11 +308,21 @@ void cli_free_signing_context(struct cli_state *cli)
cli_null_set_signing(cli);
}
+/**
+ * Sign a packet with the current mechinism
+ */
+
void cli_caclulate_sign_mac(struct cli_state *cli)
{
cli->sign_info.sign_outgoing_message(cli);
}
+/**
+ * Check a packet with the current mechinism
+ * @return False if we had an established signing connection
+ * which had a back checksum, True otherwise
+ */
+
BOOL cli_check_sign_mac(struct cli_state *cli)
{
BOOL good;