summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-11-16 17:58:10 +0100
committerVolker Lendecke <vlendec@samba.org>2010-11-17 12:02:34 +0000
commitd1c1aaeb8b9ca662f57e74546c56c9213c7e3920 (patch)
tree564f7bba30c8623041c0abc41576967c4bf4d0d0 /source3
parentbdf830ac6171020d18c0a07787c305b766e0ec61 (diff)
downloadsamba-d1c1aaeb8b9ca662f57e74546c56c9213c7e3920.tar.gz
samba-d1c1aaeb8b9ca662f57e74546c56c9213c7e3920.tar.bz2
samba-d1c1aaeb8b9ca662f57e74546c56c9213c7e3920.zip
s3: Remove a reference to "winbindd_cli_state" from append_auth_data
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Nov 17 12:02:34 UTC 2010 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_pam.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 98cc335749..0053b7fba5 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -713,7 +713,8 @@ bool check_request_flags(uint32_t flags)
/****************************************************************
****************************************************************/
-static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
+static NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
+ struct winbindd_response *resp,
uint32_t request_flags,
struct netr_SamInfo3 *info3,
const char *name_domain,
@@ -722,21 +723,21 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
NTSTATUS result;
if (request_flags & WBFLAG_PAM_USER_SESSION_KEY) {
- memcpy(state->response->data.auth.user_session_key,
+ memcpy(resp->data.auth.user_session_key,
info3->base.key.key,
- sizeof(state->response->data.auth.user_session_key)
+ sizeof(resp->data.auth.user_session_key)
/* 16 */);
}
if (request_flags & WBFLAG_PAM_LMKEY) {
- memcpy(state->response->data.auth.first_8_lm_hash,
+ memcpy(resp->data.auth.first_8_lm_hash,
info3->base.LMSessKey.key,
- sizeof(state->response->data.auth.first_8_lm_hash)
+ sizeof(resp->data.auth.first_8_lm_hash)
/* 8 */);
}
if (request_flags & WBFLAG_PAM_UNIX_NAME) {
- result = append_unix_username(state->mem_ctx, state->response,
+ result = append_unix_username(mem_ctx, resp,
info3, name_domain, name_user);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("Failed to append Unix Username: %s\n",
@@ -748,8 +749,7 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
/* currently, anything from here on potentially overwrites extra_data. */
if (request_flags & WBFLAG_PAM_INFO3_NDR) {
- result = append_info3_as_ndr(state->mem_ctx, state->response,
- info3);
+ result = append_info3_as_ndr(mem_ctx, resp, info3);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("Failed to append INFO3 (NDR): %s\n",
nt_errstr(result)));
@@ -758,8 +758,7 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
}
if (request_flags & WBFLAG_PAM_INFO3_TEXT) {
- result = append_info3_as_txt(state->mem_ctx, state->response,
- info3);
+ result = append_info3_as_txt(mem_ctx, resp, info3);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("Failed to append INFO3 (TXT): %s\n",
nt_errstr(result)));
@@ -768,7 +767,7 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
}
if (request_flags & WBFLAG_PAM_AFS_TOKEN) {
- result = append_afs_token(state->mem_ctx, state->response,
+ result = append_afs_token(mem_ctx, resp,
info3, name_domain, name_user);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("Failed to append AFS token: %s\n",
@@ -1574,7 +1573,8 @@ process_result:
goto done;
}
- result = append_auth_data(state, state->request->flags, info3,
+ result = append_auth_data(state->mem_ctx, state->response,
+ state->request->flags, info3,
name_domain, name_user);
if (!NT_STATUS_IS_OK(result)) {
goto done;
@@ -1781,7 +1781,8 @@ process_result:
goto done;
}
- result = append_auth_data(state, state->request->flags, info3,
+ result = append_auth_data(state->mem_ctx, state->response,
+ state->request->flags, info3,
name_domain, name_user);
if (!NT_STATUS_IS_OK(result)) {
goto done;