1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s4:libcli: Return if encryption is requested for SMB1

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andreas Schneider 2020-07-07 12:54:26 +02:00 committed by Andreas Schneider
parent e2287011f4
commit 7387c1da31

View File

@ -620,10 +620,17 @@ struct composite_context *smb_composite_sesssetup_send(struct smbcli_session *se
struct composite_context *c;
struct sesssetup_state *state;
NTSTATUS status;
enum smb_encryption_setting encryption_state =
cli_credentials_get_smb_encryption(io->in.credentials);
c = composite_create(session, session->transport->ev);
if (c == NULL) return NULL;
if (encryption_state > SMB_ENCRYPTION_DESIRED) {
composite_error(c, NT_STATUS_PROTOCOL_NOT_SUPPORTED);
return c;
}
state = talloc_zero(c, struct sesssetup_state);
if (composite_nomem(state, c)) return c;
c->private_data = state;