Module: wine Branch: master Commit: ed317f76c7286c840bb3275138fc01784e0ac2e6 URL: https://source.winehq.org/git/wine.git/?a=commit;h=ed317f76c7286c840bb327513...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Thu Jan 18 23:54:05 2018 +0800
secur32: Implement FreeCredentialsHandle in the SSP/AP wrapper.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/secur32/lsa.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/secur32/lsa.c b/dlls/secur32/lsa.c index 2ec3818..1916aa4 100644 --- a/dlls/secur32/lsa.c +++ b/dlls/secur32/lsa.c @@ -377,13 +377,32 @@ done: return status; }
+static SECURITY_STATUS WINAPI lsa_FreeCredentialsHandle(CredHandle *credential) +{ + struct lsa_package *lsa_package; + LSA_SEC_HANDLE lsa_credential; + + TRACE("%p\n", credential); + if (!credential) return SEC_E_INVALID_HANDLE; + + lsa_package = (struct lsa_package *)credential->dwUpper; + lsa_credential = (LSA_SEC_HANDLE)credential->dwLower; + + if (!lsa_package) return SEC_E_INVALID_HANDLE; + + if (!lsa_package->lsa_api || !lsa_package->lsa_api->FreeCredentialsHandle) + return SEC_E_UNSUPPORTED_FUNCTION; + + return lsa_package->lsa_api->FreeCredentialsHandle(lsa_credential); +} + static const SecurityFunctionTableW lsa_sspi_tableW = { 1, NULL, /* EnumerateSecurityPackagesW */ NULL, /* QueryCredentialsAttributesW */ lsa_AcquireCredentialsHandleW, - NULL, /* FreeCredentialsHandle */ + lsa_FreeCredentialsHandle, NULL, /* Reserved2 */ NULL, /* InitializeSecurityContextW */ NULL, /* AcceptSecurityContext */ @@ -415,7 +434,7 @@ static const SecurityFunctionTableA lsa_sspi_tableA = NULL, /* EnumerateSecurityPackagesA */ NULL, /* QueryCredentialsAttributesA */ lsa_AcquireCredentialsHandleA, - NULL, /* FreeCredentialsHandle */ + lsa_FreeCredentialsHandle, NULL, /* Reserved2 */ NULL, /* InitializeSecurityContextA */ NULL, /* AcceptSecurityContext */