summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2012-11-29 22:47:40 +0100
committerStefan Metzmacher <metze@samba.org>2012-12-09 19:39:07 +0100
commit01e69703fb8c58ab1940bb560e34f6c3f10e0ae9 (patch)
tree258b09162c18ef58cb822be0f3abf546d694ce1f /source4/rpc_server
parent3dc8c20b8a94063c6578b60750757c5a40d7db38 (diff)
downloadsamba-01e69703fb8c58ab1940bb560e34f6c3f10e0ae9.tar.gz
samba-01e69703fb8c58ab1940bb560e34f6c3f10e0ae9.tar.bz2
samba-01e69703fb8c58ab1940bb560e34f6c3f10e0ae9.zip
s4-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>
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 633687fd9d..5db4fd1201 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -487,7 +487,12 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal
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(mem_ctx, password_buf.data, &new_password)) {
DEBUG(3,("samr: failed to decode password buffer\n"));