Module: wine Branch: master Commit: 0b18d0c825848abeec62b650d3b95056297c5d87 URL: https://gitlab.winehq.org/wine/wine/-/commit/0b18d0c825848abeec62b650d3b9505...
Author: Konstantin Romanov incubusrk@gmail.com Date: Thu Aug 18 17:01:13 2022 +0300
kerberos: Fix condition for create_context_handle in kerberos_SpInitLsaModeContext and kerberos_SpAcceptLsaModeContext.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53472
---
dlls/kerberos/krb5_ap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/kerberos/krb5_ap.c b/dlls/kerberos/krb5_ap.c index b600ff06052..84d742079e6 100644 --- a/dlls/kerberos/krb5_ap.c +++ b/dlls/kerberos/krb5_ap.c @@ -424,9 +424,10 @@ static NTSTATUS NTAPI kerberos_SpInitLsaModeContext( LSA_SEC_HANDLE credential, params.output_token_length = &output->pBuffers[idx].cbBuffer;
status = KRB5_CALL( initialize_context, ¶ms ); + if (status == SEC_E_OK || status == SEC_I_CONTINUE_NEEDED) + *new_context = create_context_handle( context_handle, new_context_handle ); if (!status) { - *new_context = create_context_handle( context_handle, new_context_handle ); *mapped_context = TRUE; expiry_to_timestamp( exptime, expiry ); } @@ -473,9 +474,10 @@ static NTSTATUS NTAPI kerberos_SpAcceptLsaModeContext( LSA_SEC_HANDLE credential
/* FIXME: check if larger output buffer exists */ status = KRB5_CALL( accept_context, ¶ms ); + if (status == SEC_E_OK || status == SEC_I_CONTINUE_NEEDED) + *new_context = create_context_handle( context_handle, new_context_handle ); if (!status) { - *new_context = create_context_handle( context_handle, new_context_handle ); *mapped_context = TRUE; expiry_to_timestamp( exptime, expiry ); }