summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_netlog_nt.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-08-25 18:44:24 +0200
committerGünther Deschner <gd@samba.org>2009-08-26 00:48:04 +0200
commit5b46e5985e0f0edc199408c713a02dbe37faa381 (patch)
tree0cb2ea2eda1a264dda23ab573888841a0d6a3316 /source3/rpc_server/srv_netlog_nt.c
parent1a53b617710b1bf9555de6ab01afeaf6f9c1d42a (diff)
downloadsamba-5b46e5985e0f0edc199408c713a02dbe37faa381.tar.gz
samba-5b46e5985e0f0edc199408c713a02dbe37faa381.tar.bz2
samba-5b46e5985e0f0edc199408c713a02dbe37faa381.zip
s3-netlogon: let get_md4pw() return a struct samr_Password.
(in preparation of credential merge). Guenther
Diffstat (limited to 'source3/rpc_server/srv_netlog_nt.c')
-rw-r--r--source3/rpc_server/srv_netlog_nt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index de898569f2..2488b15fb2 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -296,7 +296,7 @@ WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p,
gets a machine password entry. checks access rights of the host.
******************************************************************/
-static NTSTATUS get_md4pw(char *md4pw, const char *mach_acct,
+static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct,
uint16_t sec_chan_type, uint32_t *rid)
{
struct samu *sampass = NULL;
@@ -390,8 +390,8 @@ static NTSTATUS get_md4pw(char *md4pw, const char *mach_acct,
return NT_STATUS_LOGON_FAILURE;
}
- memcpy(md4pw, pass, 16);
- dump_data(5, (uint8 *)md4pw, 16);
+ memcpy(md4pw->hash, pass, 16);
+ dump_data(5, md4pw->hash, 16);
if (rid) {
*rid = pdb_get_user_rid(sampass);
@@ -481,6 +481,7 @@ NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p,
struct netr_Credential srv_chal_out;
const char *fn;
uint32_t rid;
+ struct samr_Password mach_pwd;
/* According to Microsoft (see bugid #6099)
* Windows 7 looks at the negotiate_flags
@@ -546,7 +547,7 @@ NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p,
goto out;
}
- status = get_md4pw((char *)p->dc->mach_pw,
+ status = get_md4pw(&mach_pwd,
r->in.account_name,
r->in.secure_channel_type,
&rid);
@@ -564,7 +565,7 @@ NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p,
p->dc,
&p->dc->clnt_chal, /* Stored client chal. */
&p->dc->srv_chal, /* Stored server chal. */
- p->dc->mach_pw,
+ mach_pwd.hash,
&srv_chal_out);
/* Check client credentials are valid. */