summaryrefslogtreecommitdiff
path: root/source3/smbd/smb2_negprot.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-10-02 14:10:21 -0700
committerJeremy Allison <jra@samba.org>2012-10-03 00:59:42 +0200
commitdfd3c31a3f9eea96854b2d22574856368e86b245 (patch)
treef2e4cfa649eca5dffb635728a5c29a98ae1146d5 /source3/smbd/smb2_negprot.c
parentc251a6b0442abc13bc8be4ff8de324c1d7706a78 (diff)
downloadsamba-dfd3c31a3f9eea96854b2d22574856368e86b245.tar.gz
samba-dfd3c31a3f9eea96854b2d22574856368e86b245.tar.bz2
samba-dfd3c31a3f9eea96854b2d22574856368e86b245.zip
Fix bug #9222 - smbd ignores the "server signing = no" setting for SMB2.
Still sign if client request is signed, just don't negotiate it in negprot or sessionsetup. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Oct 3 00:59:42 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd/smb2_negprot.c')
-rw-r--r--source3/smbd/smb2_negprot.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index 6adc5819ec..826e0d1d2a 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -92,7 +92,7 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
DATA_BLOB security_buffer;
size_t expected_dyn_size = 0;
size_t c;
- uint16_t security_mode;
+ uint16_t security_mode = 0;
uint16_t dialect_count;
uint16_t in_security_mode;
uint32_t in_capabilities;
@@ -244,9 +244,11 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_INTERNAL_ERROR);
}
- security_mode = SMB2_NEGOTIATE_SIGNING_ENABLED;
- if (lp_server_signing() == SMB_SIGNING_REQUIRED) {
- security_mode |= SMB2_NEGOTIATE_SIGNING_REQUIRED;
+ if (lp_server_signing() != SMB_SIGNING_OFF) {
+ security_mode = SMB2_NEGOTIATE_SIGNING_ENABLED;
+ if (lp_server_signing() == SMB_SIGNING_REQUIRED) {
+ security_mode |= SMB2_NEGOTIATE_SIGNING_REQUIRED;
+ }
}
capabilities = 0;