1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-30 06:50:24 +03:00

smbd: Make SMB3 clients use encryption with "smb encrypt = auto"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Mar  3 10:40:42 CET 2015 on sn-devel-104
This commit is contained in:
Volker Lendecke 2015-02-25 16:59:26 +01:00
parent a3adad7a17
commit b3385f74db
2 changed files with 10 additions and 0 deletions

View File

@ -190,6 +190,11 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session,
x->global->signing_required = true;
}
if ((lp_smb_encrypt(-1) > SMB_SIGNING_OFF) &&
(xconn->smb2.client.capabilities & SMB2_CAP_ENCRYPTION)) {
x->global->encryption_required = true;
}
if (lp_smb_encrypt(-1) == SMB_SIGNING_REQUIRED) {
x->global->encryption_required = true;
}

View File

@ -235,6 +235,11 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
return NT_STATUS_BAD_NETWORK_NAME;
}
if ((lp_smb_encrypt(snum) > SMB_SIGNING_OFF) &&
(conn->smb2.client.capabilities & SMB2_CAP_ENCRYPTION)) {
encryption_required = true;
}
if (lp_smb_encrypt(snum) == SMB_SIGNING_REQUIRED) {
encryption_required = true;
}