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/libnet/libnet_samsync.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'source3/libnet') diff --git a/source3/libnet/libnet_samsync.c b/source3/libnet/libnet_samsync.c index 0c00b8518a..b4dbe3afde 100644 --- a/source3/libnet/libnet_samsync.c +++ b/source3/libnet/libnet_samsync.c @@ -23,6 +23,7 @@ #include "includes.h" #include "libnet/libnet.h" +#include "../lib/crypto/crypto.h" /** * Decrypt and extract the user's passwords. @@ -72,7 +73,7 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx, enum ndr_err_code ndr_err; data.data = user->user_private_info.SensitiveData; data.length = user->user_private_info.DataLength; - SamOEMhashBlob(data.data, data.length, session_key); + arcfour_crypt_blob(data.data, data.length, session_key); user->user_private_info.SensitiveData = data.data; user->user_private_info.DataLength = data.length; @@ -127,13 +128,13 @@ static NTSTATUS fix_secret(TALLOC_CTX *mem_ctx, { struct netr_DELTA_SECRET *secret = delta->delta_union.secret; - SamOEMhashBlob(secret->current_cipher.cipher_data, - secret->current_cipher.maxlen, - session_key); - - SamOEMhashBlob(secret->old_cipher.cipher_data, - secret->old_cipher.maxlen, - session_key); + arcfour_crypt_blob(secret->current_cipher.cipher_data, + secret->current_cipher.maxlen, + session_key); + + arcfour_crypt_blob(secret->old_cipher.cipher_data, + secret->old_cipher.maxlen, + session_key); return NT_STATUS_OK; } -- cgit