summaryrefslogtreecommitdiffstats
path: root/source/libsmb/smb_signing.c
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
commit05cffbee56f0556f550b4d14f3111bd7db972621 (patch)
treeb2b1125b565a215e38e5df1e45de43746f59abb6 /source/libsmb/smb_signing.c
parentef6cb3ec1aa943d4e52ea08e7b43a47d781d3273 (diff)
downloadsamba-05cffbee56f0556f550b4d14f3111bd7db972621.tar.gz
samba-05cffbee56f0556f550b4d14f3111bd7db972621.tar.xz
samba-05cffbee56f0556f550b4d14f3111bd7db972621.zip
Try not to clobber the session request.
Diffstat (limited to 'source/libsmb/smb_signing.c')
-rw-r--r--source/libsmb/smb_signing.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/source/libsmb/smb_signing.c b/source/libsmb/smb_signing.c
index b3a63518936..581d18fef77 100644
--- a/source/libsmb/smb_signing.c
+++ b/source/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;