s3/smbd: ensure global "smb encrypt = off" is effective for SMB 1 clients
authorRalph Boehme <slow@samba.org>
Wed, 18 Jan 2017 15:19:15 +0000 (16:19 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 1 Feb 2017 11:55:21 +0000 (12:55 +0100)
commit4f1ac976beee17cbd9aef8168b58cba020968549
tree8d8617ee08dfc613e90fbb3dd6042aead60ed7d2
parenta6fd161d5c295cf86f6ffe1d74c7892006275876
s3/smbd: ensure global "smb encrypt = off" is effective for SMB 1 clients

If encryption is disabled globally, per definition we shouldn't allow
enabling encryption on individual shares.

The behaviour of setting

[Global]
  smb encrypt = off

[share_required]
  smb encrypt = required

[share_desired]
  smb encrypt = desired

must be to completely deny access to the share "share_required" and an
unencrypted connection to "share_desired".

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12520

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 43a90cee46bb7a70f7973c4fc51eee7634e43145)
source3/smbd/service.c