summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-26 17:17:36 -0800
committerJeremy Allison <jra@samba.org>2007-12-26 17:17:36 -0800
commit3a52874815b2b58f361ef4eb104f0bebd0cdb6ae (patch)
tree8472c70a86a26a27979462535d1a80cba03790ac /source3/libsmb
parentafc93255d183eefb68e45b8ec6275f6a62cf9795 (diff)
downloadsamba-3a52874815b2b58f361ef4eb104f0bebd0cdb6ae.tar.gz
samba-3a52874815b2b58f361ef4eb104f0bebd0cdb6ae.tar.bz2
samba-3a52874815b2b58f361ef4eb104f0bebd0cdb6ae.zip
Encryption works better when you add the client decrypt code :-).
Jeremy. (This used to be commit d67b2634068be9c69082a2b8c22c831aba371cd9)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index da225ebc24..ecef293d07 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -86,6 +86,17 @@ static ssize_t client_receive_smb(struct cli_state *cli, size_t maxlen)
break;
}
}
+
+ if (cli_encryption_on(cli)) {
+ NTSTATUS status = cli_decrypt_message(cli);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("SMB decryption failed on incoming packet! Error %s\n",
+ nt_errstr(status)));
+ cli->smb_rw_error = SMB_READ_BAD_DECRYPT;
+ return -1;
+ }
+ }
+
show_msg(cli->inbuf);
return len;
}