From 1362d542df715aa31e9b818ee8783b5ee35f8870 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 29 Nov 2012 21:35:04 +0100 Subject: s3-rpc_server: support AES decryption in netr_ServerPasswordSet2 server. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Stefan Metzmacher --- source3/rpc_server/netlogon/srv_netlog_nt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c index d992a65561..5fc2756963 100644 --- a/source3/rpc_server/netlogon/srv_netlog_nt.c +++ b/source3/rpc_server/netlogon/srv_netlog_nt.c @@ -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); -- cgit