mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
As SMB3 has transport level encryption, allow smbclient -e to force encryted SMB3 transport.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
committed by
Michael Adam
parent
25521c9085
commit
81e1058e20
@ -48,7 +48,23 @@ NTSTATUS cli_cm_force_encryption(struct cli_state *c,
|
||||
const char *domain,
|
||||
const char *sharename)
|
||||
{
|
||||
NTSTATUS status = cli_force_encryption(c,
|
||||
NTSTATUS status;
|
||||
|
||||
if (smbXcli_conn_protocol(c->conn) >= PROTOCOL_SMB2_02) {
|
||||
status = smb2cli_session_encryption_on(c->smb2.session);
|
||||
if (NT_STATUS_EQUAL(status,NT_STATUS_NOT_SUPPORTED)) {
|
||||
d_printf("Encryption required and "
|
||||
"server doesn't support "
|
||||
"SMB3 encryption - failing connect\n");
|
||||
} else if (!NT_STATUS_IS_OK(status)) {
|
||||
d_printf("Encryption required and "
|
||||
"setup failed with error %s.\n",
|
||||
nt_errstr(status));
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
status = cli_force_encryption(c,
|
||||
username,
|
||||
password,
|
||||
domain);
|
||||
|
Reference in New Issue
Block a user