From f28f113d8e76824b080359c90efd9c92de533740 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 16 Mar 2009 21:27:58 +1100 Subject: Rework Samba3 to use new libcli/auth code (partial) This commit is mostly to cope with the removal of SamOemHash (replaced by arcfour_crypt()) and other collisions (such as changed function arguments compared to Samba3). We still provide creds_hash3 until Samba3 uses the credentials code in netlogon server Andrew Bartlett --- source3/rpc_client/init_netlogon.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/rpc_client/init_netlogon.c') diff --git a/source3/rpc_client/init_netlogon.c b/source3/rpc_client/init_netlogon.c index 793b9c7de5..cb49381eac 100644 --- a/source3/rpc_client/init_netlogon.c +++ b/source3/rpc_client/init_netlogon.c @@ -18,6 +18,7 @@ */ #include "includes.h" +#include "../libcli/auth/libcli_auth.h" /******************************************************************* inits a structure. @@ -259,7 +260,7 @@ NTSTATUS serverinfo_to_SamInfo3(struct auth_serversupplied_info *server_info, MIN(sizeof(user_session_key.key), server_info->user_session_key.length)); if (pipe_session_key) { - SamOEMhash(user_session_key.key, pipe_session_key, 16); + arcfour_crypt(user_session_key.key, pipe_session_key, 16); } } if (server_info->lm_session_key.length) { @@ -268,7 +269,7 @@ NTSTATUS serverinfo_to_SamInfo3(struct auth_serversupplied_info *server_info, MIN(sizeof(lm_session_key.key), server_info->lm_session_key.length)); if (pipe_session_key) { - SamOEMhash(lm_session_key.key, pipe_session_key, 8); + arcfour_crypt(lm_session_key.key, pipe_session_key, 8); } } @@ -418,7 +419,7 @@ void init_netr_CryptPassword(const char *pwd, encode_pw_buffer(password_buf.data, pwd, STR_UNICODE); - SamOEMhash(password_buf.data, session_key, 516); + arcfour_crypt(password_buf.data, session_key, 516); memcpy(pwd_buf->data, password_buf.data, 512); pwd_buf->length = IVAL(password_buf.data, 512); } -- cgit