diff options
author | Michael Adam <obnox@samba.org> | 2015-07-01 18:07:26 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2015-07-07 14:05:27 +0200 |
commit | fc228025d78f165815d3fa1670d51f0c27ed2091 (patch) | |
tree | 588a08dac58a5200f30740f27b1efd09b9f2f400 /source3 | |
parent | 3bb299944391633c45d87d5e8ad48c2c14428592 (diff) | |
download | samba-fc228025d78f165815d3fa1670d51f0c27ed2091.tar.gz |
smbd:smb2: only enable encryption in session if desired
Don't enforce it but only announce ENCRYPT_DATA, using the
encryption_desired flag in session setup.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11372
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/smb2_sesssetup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index da7adb3031e..11d381fcdb4 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -262,12 +262,13 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session, x->global->signing_required = true; } - if ((lp_smb_encrypt(-1) > SMB_SIGNING_OFF) && + if ((lp_smb_encrypt(-1) >= SMB_SIGNING_DESIRED) && (xconn->smb2.client.capabilities & SMB2_CAP_ENCRYPTION)) { - x->global->encryption_required = true; + x->encryption_desired = true; } if (lp_smb_encrypt(-1) == SMB_SIGNING_REQUIRED) { + x->encryption_desired = true; x->global->encryption_required = true; } @@ -294,7 +295,7 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session, } } - if (x->global->encryption_required) { + if (x->encryption_desired) { *out_session_flags |= SMB2_SESSION_FLAG_ENCRYPT_DATA; } |