From 5b19286df08d6cf10654d6e20c323ba44f7d2054 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 17 Jun 2005 13:12:13 +0000 Subject: 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) --- source4/librpc/rpc/dcerpc_schannel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/librpc/rpc/dcerpc_schannel.c') 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; -- cgit