summaryrefslogtreecommitdiff
path: root/source3/libnet/libnet_samsync.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-03-16 21:27:58 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-04-14 16:23:35 +1000
commitf28f113d8e76824b080359c90efd9c92de533740 (patch)
tree063c8cf44e1a26adce9128f3e24ee55274292090 /source3/libnet/libnet_samsync.c
parentfd3be5c4e5e185115eec59752a22f7f354f860ca (diff)
downloadsamba-f28f113d8e76824b080359c90efd9c92de533740.tar.gz
samba-f28f113d8e76824b080359c90efd9c92de533740.tar.bz2
samba-f28f113d8e76824b080359c90efd9c92de533740.zip
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
Diffstat (limited to 'source3/libnet/libnet_samsync.c')
-rw-r--r--source3/libnet/libnet_samsync.c17
1 files changed, 9 insertions, 8 deletions
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;
}