diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-07-22 04:10:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:29:55 -0500 |
commit | b16362fab65d0700bd6a8cf6569a9e21c7e6b069 (patch) | |
tree | cd68807d497dac925038d03c3786308825b02e10 /source4/auth/auth_domain.c | |
parent | 176c0d1b771d0e81167a12eb81eddb40732b074a (diff) | |
download | samba-b16362fab65d0700bd6a8cf6569a9e21c7e6b069.tar.gz samba-b16362fab65d0700bd6a8cf6569a9e21c7e6b069.tar.bz2 samba-b16362fab65d0700bd6a8cf6569a9e21c7e6b069.zip |
r8700: Propmted by tridge's need to do plaintext auth in ejs, rework the
user_info strcture in auth/
This moves it to a pattern much like that found in ntvfs, with
functions to migrate between PAIN, HASH and RESPONSE passwords.
Instead of make_user_info*() functions, we simply fill in the control
block in the callers, per recent dicussions on the lists. This
removed a lot of data copies as well as error paths, as we can grab
much of it with talloc.
Andrew Bartlett
(This used to be commit ecbd2235a3e2be937440fa1dc0aecc5a047eda88)
Diffstat (limited to 'source4/auth/auth_domain.c')
-rw-r--r-- | source4/auth/auth_domain.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source4/auth/auth_domain.c b/source4/auth/auth_domain.c index 339cc18531..2570149902 100644 --- a/source4/auth/auth_domain.c +++ b/source4/auth/auth_domain.c @@ -53,9 +53,6 @@ static NTSTATUS domain_check_password(struct auth_method_context *ctx, return NT_STATUS_INVALID_PARAMETER; } - if (!user_info->account_name) { - return NT_STATUS_INVALID_PARAMETER; - } if (!user_info->workstation_name) { return NT_STATUS_INVALID_PARAMETER; } @@ -97,18 +94,18 @@ static NTSTATUS domain_check_password(struct auth_method_context *ctx, return status; } - ninfo.identity_info.domain_name.string = user_info->domain_name; + ninfo.identity_info.domain_name.string = user_info->client.domain_name; ninfo.identity_info.parameter_control = 0; ninfo.identity_info.logon_id_low = 0; ninfo.identity_info.logon_id_high = 0; - ninfo.identity_info.account_name.string = user_info->account_name; + ninfo.identity_info.account_name.string = user_info->client.account_name; ninfo.identity_info.workstation.string = user_info->workstation_name; memcpy(ninfo.challenge, ctx->auth_ctx->challenge.data.data, sizeof(ninfo.challenge)); - ninfo.nt.length = user_info->nt_resp.length; - ninfo.nt.data = user_info->nt_resp.data; - ninfo.lm.length = user_info->lm_resp.length; - ninfo.lm.data = user_info->lm_resp.data; + ninfo.nt.length = user_info->password.response.nt.length; + ninfo.nt.data = user_info->password.response.nt.data; + ninfo.lm.length = user_info->password.response.lanman.length; + ninfo.lm.data = user_info->password.response.lanman.data; r.in.server_name = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p)); r.in.workstation = cli_credentials_get_workstation(credentials); @@ -135,7 +132,7 @@ static NTSTATUS domain_check_password(struct auth_method_context *ctx, } status = make_server_info_netlogon_validation(mem_ctx, - user_info->account_name, + user_info->client.account_name, r.in.validation_level, &r.out.validation, server_info); return status; |