summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2012-11-29 21:30:24 +0100
committerStefan Metzmacher <metze@samba.org>2012-12-09 19:39:07 +0100
commitec06c81db313f2862544c972cbf582a07bb844c2 (patch)
tree64930809e53f0b5cb1ab7d2277367c6513420a39 /source3
parent429600c5f3079c8433d5a542383908d6ff61fe60 (diff)
downloadsamba-ec06c81db313f2862544c972cbf582a07bb844c2.tar.gz
samba-ec06c81db313f2862544c972cbf582a07bb844c2.tar.bz2
samba-ec06c81db313f2862544c972cbf582a07bb844c2.zip
s3-rpc_client: use netlogon_creds_arcfour_crypt() in init_netr_CryptPassword.
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_netlogon.c2
-rw-r--r--source3/rpc_client/init_netlogon.c6
-rw-r--r--source3/rpc_client/init_netlogon.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index bbcca06a60..463741ac05 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -628,7 +628,7 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
uint32_t old_timeout;
init_netr_CryptPassword(new_trust_pwd_cleartext,
- cli->dc->session_key,
+ cli->dc,
&new_password);
old_timeout = dcerpc_binding_handle_set_timeout(b, 600000);
diff --git a/source3/rpc_client/init_netlogon.c b/source3/rpc_client/init_netlogon.c
index 445108a7d3..0d33d6fdd6 100644
--- a/source3/rpc_client/init_netlogon.c
+++ b/source3/rpc_client/init_netlogon.c
@@ -1,7 +1,7 @@
/*
* Unix SMB/CIFS implementation.
* RPC Pipe client / server routines
- * Copyright (C) Guenther Deschner 2008.
+ * Copyright (C) Guenther Deschner 2008,2012
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,14 +27,14 @@
*************************************************************************/
void init_netr_CryptPassword(const char *pwd,
- unsigned char session_key[16],
+ struct netlogon_creds_CredentialState *creds,
struct netr_CryptPassword *pwd_buf)
{
struct samr_CryptPassword password_buf;
encode_pw_buffer(password_buf.data, pwd, STR_UNICODE);
- arcfour_crypt(password_buf.data, session_key, 516);
+ netlogon_creds_arcfour_crypt(creds, password_buf.data, 516);
memcpy(pwd_buf->data, password_buf.data, 512);
pwd_buf->length = IVAL(password_buf.data, 512);
}
diff --git a/source3/rpc_client/init_netlogon.h b/source3/rpc_client/init_netlogon.h
index 826d0c56bb..bb4496b4cd 100644
--- a/source3/rpc_client/init_netlogon.h
+++ b/source3/rpc_client/init_netlogon.h
@@ -23,7 +23,7 @@
/* The following definitions come from rpc_client/init_netlogon.c */
void init_netr_CryptPassword(const char *pwd,
- unsigned char session_key[16],
+ struct netlogon_creds_CredentialState *creds,
struct netr_CryptPassword *pwd_buf);
#endif /* _RPC_CLIENT_INIT_NETLOGON_H_ */