1
0
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:
Günther Deschner 2012-11-29 21:35:04 +01:00 committed by Stefan Metzmacher
parent 64345018cd
commit 1362d542df

View File

@ -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);