From 685b4625bcbae46b332a8c3dbb02d59812084519 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 25 Apr 2010 15:36:02 +0200 Subject: [PATCH] s3: Fix the code order in append_auth_data MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is to comply with the comment "currently, anything from here on potentially overwrites extra_data." Günther, please check! --- source3/winbindd/winbindd_pam.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index aea2a2a34f3..b062fd1d77c 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -757,10 +757,11 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state, /* 8 */); } - if (flags & WBFLAG_PAM_INFO3_TEXT) { - result = append_info3_as_txt(state->mem_ctx, state, info3); + if (flags & WBFLAG_PAM_UNIX_NAME) { + result = append_unix_username(state->mem_ctx, state, info3, + name_domain, name_user); if (!NT_STATUS_IS_OK(result)) { - DEBUG(10,("Failed to append INFO3 (TXT): %s\n", + DEBUG(10,("Failed to append Unix Username: %s\n", nt_errstr(result))); return result; } @@ -777,11 +778,10 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state, } } - if (flags & WBFLAG_PAM_UNIX_NAME) { - result = append_unix_username(state->mem_ctx, state, info3, - name_domain, name_user); + if (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 Unix Username: %s\n", + DEBUG(10,("Failed to append INFO3 (TXT): %s\n", nt_errstr(result))); return result; } -- 2.11.4.GIT