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:
parent
e2287011f4
commit
7387c1da31
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user