summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_pam.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index b4a1b9d7c4..92c555d2db 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -716,28 +716,28 @@ bool check_request_flags(uint32_t flags)
****************************************************************/
static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
+ uint32_t request_flags,
struct netr_SamInfo3 *info3,
const char *name_domain,
const char *name_user)
{
NTSTATUS result;
- uint32_t flags = state->request->flags;
- if (flags & WBFLAG_PAM_USER_SESSION_KEY) {
+ if (request_flags & WBFLAG_PAM_USER_SESSION_KEY) {
memcpy(state->response->data.auth.user_session_key,
info3->base.key.key,
sizeof(state->response->data.auth.user_session_key)
/* 16 */);
}
- if (flags & WBFLAG_PAM_LMKEY) {
+ if (request_flags & WBFLAG_PAM_LMKEY) {
memcpy(state->response->data.auth.first_8_lm_hash,
info3->base.LMSessKey.key,
sizeof(state->response->data.auth.first_8_lm_hash)
/* 8 */);
}
- if (flags & WBFLAG_PAM_UNIX_NAME) {
+ if (request_flags & WBFLAG_PAM_UNIX_NAME) {
result = append_unix_username(state->mem_ctx, state, info3,
name_domain, name_user);
if (!NT_STATUS_IS_OK(result)) {
@@ -749,7 +749,7 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
/* currently, anything from here on potentially overwrites extra_data. */
- if (flags & WBFLAG_PAM_INFO3_NDR) {
+ if (request_flags & WBFLAG_PAM_INFO3_NDR) {
result = append_info3_as_ndr(state->mem_ctx, state, info3);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("Failed to append INFO3 (NDR): %s\n",
@@ -758,7 +758,7 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
}
}
- if (flags & WBFLAG_PAM_INFO3_TEXT) {
+ if (request_flags & WBFLAG_PAM_INFO3_TEXT) {
result = append_info3_as_txt(state->mem_ctx, state, info3);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("Failed to append INFO3 (TXT): %s\n",
@@ -767,7 +767,7 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
}
}
- if (flags & WBFLAG_PAM_AFS_TOKEN) {
+ if (request_flags & WBFLAG_PAM_AFS_TOKEN) {
result = append_afs_token(state->mem_ctx, state, info3,
name_domain, name_user);
if (!NT_STATUS_IS_OK(result)) {
@@ -1574,8 +1574,8 @@ process_result:
goto done;
}
- result = append_auth_data(state, info3, name_domain,
- name_user);
+ result = append_auth_data(state, state->request->flags, info3,
+ name_domain, name_user);
if (!NT_STATUS_IS_OK(result)) {
goto done;
}
@@ -1781,8 +1781,8 @@ process_result:
goto done;
}
- result = append_auth_data(state, info3, name_domain,
- name_user);
+ result = append_auth_data(state, state->request->flags, info3,
+ name_domain, name_user);
if (!NT_STATUS_IS_OK(result)) {
goto done;
}