mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3-rpc_server: support AES decryption in netr_ServerPasswordSet2 server.
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
64345018cd
commit
1362d542df
@ -1332,7 +1332,12 @@ NTSTATUS _netr_ServerPasswordSet2(struct pipes_struct *p,
|
||||
|
||||
memcpy(password_buf.data, r->in.new_password->data, 512);
|
||||
SIVAL(password_buf.data, 512, r->in.new_password->length);
|
||||
netlogon_creds_arcfour_crypt(creds, password_buf.data, 516);
|
||||
|
||||
if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
|
||||
netlogon_creds_aes_decrypt(creds, password_buf.data, 516);
|
||||
} else {
|
||||
netlogon_creds_arcfour_crypt(creds, password_buf.data, 516);
|
||||
}
|
||||
|
||||
if (!extract_pw_from_buffer(p->mem_ctx, password_buf.data, &plaintext)) {
|
||||
TALLOC_FREE(creds);
|
||||
|
Loading…
Reference in New Issue
Block a user