s3-rpc_client: use netlogon_creds_aes_encrypt in interactive netlogon samlogon.
authorGünther Deschner <gd@samba.org>
Fri, 30 Nov 2012 23:59:44 +0000 (00:59 +0100)
committerStefan Metzmacher <metze@samba.org>
Sun, 9 Dec 2012 18:39:07 +0000 (19:39 +0100)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/rpc_client/cli_netlogon.c

index 463741ac05059133081c3dc96139033678a05c22..a0a94578beac4979be33fcd5315e454971bf5d46 100644 (file)
@@ -207,7 +207,10 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
 
                nt_lm_owf_gen(password, ntpassword.hash, lmpassword.hash);
 
-               if (cli->dc->negotiate_flags & NETLOGON_NEG_ARCFOUR) {
+               if (cli->dc->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
+                       netlogon_creds_aes_encrypt(cli->dc, lmpassword.hash, 16);
+                       netlogon_creds_aes_encrypt(cli->dc, ntpassword.hash, 16);
+               } else if (cli->dc->negotiate_flags & NETLOGON_NEG_ARCFOUR) {
                        netlogon_creds_arcfour_crypt(cli->dc, lmpassword.hash, 16);
                        netlogon_creds_arcfour_crypt(cli->dc, ntpassword.hash, 16);
                } else {