summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-09-26 02:55:19 -0700
committerKarolin Seeger <kseeger@samba.org>2013-10-02 09:18:37 +0200
commite00a2c90847b3c85f089b4f3c96ec6c66b949576 (patch)
tree94655c6f6218bb2ae4bbda4687974ded987b3de5
parentb63dbd748636adfe5c98050133b14c2b61396d11 (diff)
downloadsamba-e00a2c90847b3c85f089b4f3c96ec6c66b949576.tar.gz
s3: smb2 server - fix bug 10167 smb2 breaks "smb encryption = mandatory
Refuse an SMB2 tcon on a share wher eencryption is required. SMB2 doesn't support this. Signed-off-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/smbd/smb2_tcon.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index 5f0e3a937a3..8b955ff9604 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -207,6 +207,15 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
return NT_STATUS_BAD_NETWORK_NAME;
}
+ /* Don't allow connection if encryption is required. */
+ if (lp_smb_encrypt(snum) == Required) {
+ DEBUG(0,("Connection refused on share %s as encryption is"
+ " required on this share and SMB2 does not support"
+ " this.\n",
+ lp_servicename(snum)));
+ return NT_STATUS_ACCESS_DENIED;
+ }
+
/* create a new tcon as child of the session */
tcon = talloc_zero(req->session, struct smbd_smb2_tcon);
if (tcon == NULL) {