summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-07-23 13:47:24 +0200
committerStefan Metzmacher <metze@samba.org>2012-07-23 18:19:36 +0200
commit88f326a2c0be88bf1eb6fb7ae5348c69544815de (patch)
tree8ad70092545eb66cd330016fccbe8aab592f744d /source3
parent3fe601afcffacc84981bd54ef2293f92688f5b0e (diff)
downloadsamba-88f326a2c0be88bf1eb6fb7ae5348c69544815de.tar.gz
samba-88f326a2c0be88bf1eb6fb7ae5348c69544815de.tar.bz2
samba-88f326a2c0be88bf1eb6fb7ae5348c69544815de.zip
s3:smb2_tcon: reject access to shares mark as "smb encrypt = required"
We do not support SMB2 transport encryption yet. metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_tcon.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index 4549d3aa84..96a5c12b2a 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -231,6 +231,14 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
return NT_STATUS_BAD_NETWORK_NAME;
}
+ if (lp_smb_encrypt(snum) == SMB_SIGNING_REQUIRED) {
+ status = NT_STATUS_ACCESS_DENIED;
+ DEBUG(3,("smbd_smb2_tree_connect: "
+ "service %s needs encryption - %s\n",
+ service, nt_errstr(status)));
+ return status;
+ }
+
/* create a new tcon as child of the session */
status = smb2srv_tcon_create(req->session, now, &tcon);
if (!NT_STATUS_IS_OK(status)) {