summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-09 09:23:09 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-09 09:23:09 +0000
commit2ed7730f2d498a446dc7281e652d02a9dd2d94cf (patch)
tree88e89c9d42ad1e7cca1251a0331994ea9d345956 /source3/libsmb/clientgen.c
parent6ed674023620cc77e3276561f913b7a62ed26245 (diff)
downloadsamba-2ed7730f2d498a446dc7281e652d02a9dd2d94cf.tar.gz
samba-2ed7730f2d498a446dc7281e652d02a9dd2d94cf.tar.bz2
samba-2ed7730f2d498a446dc7281e652d02a9dd2d94cf.zip
Change the way we sign SMB packets, to a function pointer interface.
The intention is to allow for NTLMSSP and kerberos signing of packets, but for now it's just what I call 'simple' signing. (aka SMB signing per the SNIA spec) Andrew Bartlett (This used to be commit b9cf95c3dc04a45de71fb16e85c1bfbae50e6d8f)
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 6ef7a7bd9c..3cae643c38 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -177,9 +177,6 @@ void cli_setup_packet(struct cli_state *cli)
flags2 |= FLAGS2_32_BIT_ERROR_CODES;
if (cli->use_spnego)
flags2 |= FLAGS2_EXTENDED_SECURITY;
- if (cli->sign_info.use_smb_signing
- || cli->sign_info.temp_smb_signing)
- flags2 |= FLAGS2_SMB_SECURITY_SIGNATURES;
SSVAL(cli->outbuf,smb_flg2, flags2);
}
}
@@ -262,6 +259,9 @@ struct cli_state *cli_initialise(struct cli_state *cli)
if (getenv("CLI_FORCE_DOSERR"))
cli->force_dos_errors = True;
+ /* initialise signing */
+ cli_null_set_signing(cli);
+
if (lp_client_signing())
cli->sign_info.allow_smb_signing = True;
@@ -303,6 +303,7 @@ void cli_close_connection(struct cli_state *cli)
SAFE_FREE(cli->outbuf);
SAFE_FREE(cli->inbuf);
+ cli_free_signing_context(cli);
data_blob_free(&cli->secblob);
if (cli->mem_ctx) {
@@ -314,6 +315,7 @@ void cli_close_connection(struct cli_state *cli)
close(cli->fd);
cli->fd = -1;
cli->smb_rw_error = 0;
+
}
/****************************************************************************