summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-10-10 14:18:23 +0200
committerAndreas Schneider <asn@cryptomilk.org>2020-08-19 16:22:40 +0000
commitbd5a888746e15eff0a3f24e2a3e8e853fab0993b (patch)
tree504e46b92304603bb8ebb0a30712341fd9a8a2f1 /source3/smbd
parente9135035400494ed198e2a1964463c42db7a00c2 (diff)
downloadsamba-bd5a888746e15eff0a3f24e2a3e8e853fab0993b.tar.gz
param: Add 'server smb encrypt' parameter
And this also makes 'smb encrypt' a synonym of that. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/service.c4
-rw-r--r--source3/smbd/smb2_negprot.c2
-rw-r--r--source3/smbd/smb2_sesssetup.c4
-rw-r--r--source3/smbd/smb2_tcon.c4
-rw-r--r--source3/smbd/trans2.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index ed38121f292..a263c33b7e2 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -567,9 +567,9 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn,
conn->case_preserve = lp_preserve_case(snum);
conn->short_case_preserve = lp_short_preserve_case(snum);
- conn->encrypt_level = lp_smb_encrypt(snum);
+ conn->encrypt_level = lp_server_smb_encrypt(snum);
if (conn->encrypt_level > SMB_SIGNING_OFF) {
- if (lp_smb_encrypt(-1) == SMB_SIGNING_OFF) {
+ if (lp_server_smb_encrypt(-1) == SMB_SIGNING_OFF) {
if (conn->encrypt_level == SMB_SIGNING_REQUIRED) {
DBG_ERR("Service [%s] requires encryption, but "
"it is disabled globally!\n",
diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index 4071f42b5e0..674942b71de 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -335,7 +335,7 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
}
if ((protocol >= PROTOCOL_SMB2_24) &&
- (lp_smb_encrypt(-1) != SMB_SIGNING_OFF) &&
+ (lp_server_smb_encrypt(-1) != SMB_SIGNING_OFF) &&
(in_capabilities & SMB2_CAP_ENCRYPTION)) {
capabilities |= SMB2_CAP_ENCRYPTION;
}
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 2b6b3a820d4..8957411e167 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -292,12 +292,12 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session,
x->global->signing_flags = SMBXSRV_SIGNING_REQUIRED;
}
- if ((lp_smb_encrypt(-1) >= SMB_SIGNING_DESIRED) &&
+ if ((lp_server_smb_encrypt(-1) >= SMB_SIGNING_DESIRED) &&
(xconn->smb2.client.capabilities & SMB2_CAP_ENCRYPTION)) {
x->global->encryption_flags = SMBXSRV_ENCRYPTION_DESIRED;
}
- if (lp_smb_encrypt(-1) == SMB_SIGNING_REQUIRED) {
+ if (lp_server_smb_encrypt(-1) == SMB_SIGNING_REQUIRED) {
x->global->encryption_flags = SMBXSRV_ENCRYPTION_REQUIRED |
SMBXSRV_ENCRYPTION_DESIRED;
}
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index 76112d04889..0dd3c653b4b 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -302,13 +302,13 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
TALLOC_FREE(proxy);
}
- if ((lp_smb_encrypt(snum) >= SMB_SIGNING_DESIRED) &&
+ if ((lp_server_smb_encrypt(snum) >= SMB_SIGNING_DESIRED) &&
(conn->smb2.server.cipher != 0))
{
encryption_desired = true;
}
- if (lp_smb_encrypt(snum) == SMB_SIGNING_REQUIRED) {
+ if (lp_server_smb_encrypt(snum) == SMB_SIGNING_REQUIRED) {
encryption_desired = true;
encryption_required = true;
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index e2bafc64d74..251bc4c3e66 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4491,7 +4491,7 @@ static void call_trans2setfsinfo(connection_struct *conn,
return;
}
- if (lp_smb_encrypt(SNUM(conn)) == SMB_SIGNING_OFF) {
+ if (lp_server_smb_encrypt(SNUM(conn)) == SMB_SIGNING_OFF) {
reply_nterror(
req,
NT_STATUS_NOT_SUPPORTED);