diff options
author | Volker Lendecke <vl@samba.org> | 2008-04-21 08:01:51 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-04-21 23:36:05 +0200 |
commit | b78453326bf41cf3af239a5415dfef80a842d555 (patch) | |
tree | 6d788f05ceef5a1efc0ed9dd67e66366ebd6291f /source3/libsmb/smbencrypt.c | |
parent | ba0bf87d967a9544b9c97525994a43ad5b6f1f60 (diff) | |
download | samba-b78453326bf41cf3af239a5415dfef80a842d555.tar.gz samba-b78453326bf41cf3af239a5415dfef80a842d555.tar.bz2 samba-b78453326bf41cf3af239a5415dfef80a842d555.zip |
Remove the "pwd" struct from rpc_pipe_client
The only user of this was decrypt_trustdom_secret, and this only needs the NT
hash anyway.
(This used to be commit 3d8c2a47e677a4c4aacf4abf148b1bd8163c3351)
Diffstat (limited to 'source3/libsmb/smbencrypt.c')
-rw-r--r-- | source3/libsmb/smbencrypt.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index e7198b801d..11f8780a47 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -630,27 +630,23 @@ void sess_crypt_blob(DATA_BLOB *out, const DATA_BLOB *in, const DATA_BLOB *sessi } /* Decrypts password-blob with session-key - * @param pass password for session-key + * @param nt_hash NT hash for the session key * @param data_in DATA_BLOB encrypted password * * Returns cleartext password in CH_UNIX * Caller must free the returned string */ -char *decrypt_trustdom_secret(const char *pass, DATA_BLOB *data_in) +char *decrypt_trustdom_secret(uint8_t nt_hash[16], DATA_BLOB *data_in) { DATA_BLOB data_out, sess_key; - uchar nt_hash[16]; uint32_t length; uint32_t version; fstring cleartextpwd; - if (!data_in || !pass) + if (!data_in || !nt_hash) return NULL; - /* generate md4 password-hash derived from the NT UNICODE password */ - E_md4hash(pass, nt_hash); - /* hashed twice with md4 */ mdfour(nt_hash, nt_hash, 16); |