s3: Remove a reference to "winbindd_cli_state" from append_auth_data
authorVolker Lendecke <vl@samba.org>
Tue, 16 Nov 2010 16:07:33 +0000 (17:07 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 17 Nov 2010 11:17:21 +0000 (12:17 +0100)
source3/winbindd/winbindd_pam.c

index b4a1b9d7c4158be19e3db35eaaea95c5d1610fdd..92c555d2db80411538e8f4f554c735b8c892595d 100644 (file)
@@ -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;
                }