summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-11-25 18:15:52 +0000
committerJeremy Allison <jra@samba.org>2003-11-25 18:15:52 +0000
commit6ce882ef292b1e785b8b859b48256da11091c0d1 (patch)
tree0d7725579b533d080c7e9d1d14510d8856c6a694
parent1b6e6c98ba7175afb994a531bec06a7845950ff3 (diff)
downloadsamba-6ce882ef292b1e785b8b859b48256da11091c0d1.tar.gz
samba-6ce882ef292b1e785b8b859b48256da11091c0d1.tar.bz2
samba-6ce882ef292b1e785b8b859b48256da11091c0d1.zip
If signing starts successfully, don't just turn it off automatically if
it fails later. Only turn it off automatically if it fails at the start. Jeremy. (This used to be commit 4a145531c2b6353291cd25f14f5572aa31e86594)
-rw-r--r--source3/libsmb/smb_signing.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/libsmb/smb_signing.c b/source3/libsmb/smb_signing.c
index 2a53638d17..755a1548eb 100644
--- a/source3/libsmb/smb_signing.c
+++ b/source3/libsmb/smb_signing.c
@@ -745,11 +745,8 @@ We were expecting seq %u\n", reply_seq_number, saved_seq ));
}
if (!signing_good(inbuf, si, good, saved_seq)) {
- if (si->mandatory_signing) {
- /* Mandatory signing - fail and disconnect. */
- return False;
- } else {
- /* Non-mandatory signing - just turn off. */
+ if (!si->mandatory_signing && (data->send_seq_num < 3)){
+ /* Non-mandatory signing - just turn off if this is the first bad packet.. */
DEBUG(5, ("srv_check_incoming_message: signing negotiated but not required and client \
isn't sending correct signatures. Turning off.\n"));
si->negotiated_smb_signing = False;
@@ -757,6 +754,9 @@ isn't sending correct signatures. Turning off.\n"));
si->doing_signing = False;
free_signing_context(si);
return True;
+ } else {
+ /* Mandatory signing or bad packet after signing started - fail and disconnect. */
+ return False;
}
} else {
return True;