From 50eb066a67bbcdd4842b659bac888d7835e08781 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Thu, 9 Aug 2018 13:36:33 -0300 Subject: [PATCH] Merged PR 7365: Remove redundant LsaOpenServer Remove redundant LsaOpenServer Related work items: #155803 --- lsass/interop/auth/pam/pam-auth.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lsass/interop/auth/pam/pam-auth.c b/lsass/interop/auth/pam/pam-auth.c index fe5575347..50fe92ed7 100644 --- a/lsass/interop/auth/pam/pam-auth.c +++ b/lsass/interop/auth/pam/pam-auth.c @@ -328,16 +328,11 @@ DWORD sm_prompt(pam_handle_t* pamh, { LSA_LOG_PAM_DEBUG("Checking for smart card"); - dwError = LsaOpenServer(&hLsaConnection); - - if (dwError == LW_ERROR_SUCCESS) - { - dwError = LsaFindUserByName( - hLsaConnection, - ctx->pszLoginId, - dwUserInfoLevel, - (PVOID*) & pTokenUserInfo); - } + dwError = LsaFindUserByName( + hLsaConnection, + ctx->pszLoginId, + dwUserInfoLevel, + (PVOID*) & pTokenUserInfo); if (dwError == LW_ERROR_SUCCESS) {