summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-17 13:12:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:23 -0500
commit5b19286df08d6cf10654d6e20c323ba44f7d2054 (patch)
tree922bdf3301089611449f501e83e3489881427021 /source4/librpc
parenta4bb5ae30c1abcf385f02493e778755b09710d95 (diff)
downloadsamba-5b19286df08d6cf10654d6e20c323ba44f7d2054.tar.gz
samba-5b19286df08d6cf10654d6e20c323ba44f7d2054.tar.bz2
samba-5b19286df08d6cf10654d6e20c323ba44f7d2054.zip
r7690: Move the NT hash generation into the credentials system, rather than
in all the callers. This also allows us to be more flexible in the type of password we store. Andrew Bartlett (This used to be commit 00b8588c68526e1d86fda0bd81c0b86f690b62c3)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index 1b83b2ec0b..ae4ce94269 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -38,7 +38,7 @@ static NTSTATUS dcerpc_schannel_key(TALLOC_CTX *tmp_ctx,
struct netr_ServerReqChallenge r;
struct netr_ServerAuthenticate2 a;
struct netr_Credential credentials1, credentials2, credentials3;
- struct samr_Password mach_pwd;
+ const struct samr_Password *mach_pwd;
uint32_t negotiate_flags;
struct creds_CredentialState *creds;
creds = talloc(tmp_ctx, struct creds_CredentialState);
@@ -103,9 +103,10 @@ static NTSTATUS dcerpc_schannel_key(TALLOC_CTX *tmp_ctx,
/*
step 3 - authenticate on the netlogon pipe
*/
- E_md4hash(cli_credentials_get_password(credentials), mach_pwd.hash);
+ mach_pwd = cli_credentials_get_nt_hash(credentials, tmp_ctx);
+
creds_client_init(creds, &credentials1, &credentials2,
- &mach_pwd, &credentials3,
+ mach_pwd, &credentials3,
negotiate_flags);
a.in.server_name = r.in.server_name;