diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-03-17 20:06:46 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-04-14 16:23:42 +1000 |
commit | fe0f0e5670e878b8f8ddcb9f36681de69edd2025 (patch) | |
tree | 9c167d70aa1512de0b53c57d130c34ed99b50f6d | |
parent | 7cff049e7eab769ed69296da41e74fa66be42698 (diff) | |
download | samba-fe0f0e5670e878b8f8ddcb9f36681de69edd2025.tar.gz samba-fe0f0e5670e878b8f8ddcb9f36681de69edd2025.tar.bz2 samba-fe0f0e5670e878b8f8ddcb9f36681de69edd2025.zip |
Adapt to common crypto functions: sam_pwd_hash() -> sam_rid_crypt()
-rw-r--r-- | source3/libnet/libnet_join.c | 1 | ||||
-rw-r--r-- | source3/libnet/libnet_samsync.c | 17 |
2 files changed, 10 insertions, 8 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index fe9fd66fdc..724cc90596 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -20,6 +20,7 @@ #include "includes.h" #include "libnet/libnet.h" +#include "libcli/auth/libcli_auth.h" /**************************************************************** ****************************************************************/ diff --git a/source3/libnet/libnet_samsync.c b/source3/libnet/libnet_samsync.c index b4dbe3afde..b89f4efaf5 100644 --- a/source3/libnet/libnet_samsync.c +++ b/source3/libnet/libnet_samsync.c @@ -24,6 +24,7 @@ #include "includes.h" #include "libnet/libnet.h" #include "../lib/crypto/crypto.h" +#include "../libcli/auth/libcli_auth.h" /** * Decrypt and extract the user's passwords. @@ -51,7 +52,7 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx, * think this channel is secure enough. */ if (user->lm_password_present) { if (memcmp(user->lmpassword.hash, zero_buf, 16) != 0) { - sam_pwd_hash(rid, user->lmpassword.hash, lm_hash.hash, 0); + sam_rid_crypt(rid, user->lmpassword.hash, lm_hash.hash, 0); } else { memset(lm_hash.hash, '\0', sizeof(lm_hash.hash)); } @@ -60,7 +61,7 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx, if (user->nt_password_present) { if (memcmp(user->ntpassword.hash, zero_buf, 16) != 0) { - sam_pwd_hash(rid, user->ntpassword.hash, nt_hash.hash, 0); + sam_rid_crypt(rid, user->ntpassword.hash, nt_hash.hash, 0); } else { memset(nt_hash.hash, '\0', sizeof(nt_hash.hash)); } @@ -90,9 +91,9 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx, if (keys.keys.keys2.lmpassword.length == 16) { if (memcmp(keys.keys.keys2.lmpassword.pwd.hash, zero_buf, 16) != 0) { - sam_pwd_hash(rid, - keys.keys.keys2.lmpassword.pwd.hash, - lm_hash.hash, 0); + sam_rid_crypt(rid, + keys.keys.keys2.lmpassword.pwd.hash, + lm_hash.hash, 0); } else { memset(lm_hash.hash, '\0', sizeof(lm_hash.hash)); } @@ -102,9 +103,9 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx, if (keys.keys.keys2.ntpassword.length == 16) { if (memcmp(keys.keys.keys2.ntpassword.pwd.hash, zero_buf, 16) != 0) { - sam_pwd_hash(rid, - keys.keys.keys2.ntpassword.pwd.hash, - nt_hash.hash, 0); + sam_rid_crypt(rid, + keys.keys.keys2.ntpassword.pwd.hash, + nt_hash.hash, 0); } else { memset(nt_hash.hash, '\0', sizeof(nt_hash.hash)); } |