sspi: Return CURLE_LOGIN_DENIED on AcquireCredentialsHandle() failure
Return a more appropriate error, rather than CURLE_OUT_OF_MEMORY when acquiring the credentials handle fails. This is then consistent with the code prior to commit f7e24683c4 when log-in credentials were empty.
This commit is contained in:
parent
f7e24683c4
commit
f3fc3d021d
@ -477,7 +477,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
|
|||||||
ntlm->p_identity, NULL, NULL,
|
ntlm->p_identity, NULL, NULL,
|
||||||
ntlm->credentials, &expiry);
|
ntlm->credentials, &expiry);
|
||||||
if(status != SEC_E_OK)
|
if(status != SEC_E_OK)
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_LOGIN_DENIED;
|
||||||
|
|
||||||
/* Allocate our new context handle */
|
/* Allocate our new context handle */
|
||||||
ntlm->context = malloc(sizeof(CtxtHandle));
|
ntlm->context = malloc(sizeof(CtxtHandle));
|
||||||
|
@ -210,7 +210,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
|
|||||||
Curl_safefree(resp);
|
Curl_safefree(resp);
|
||||||
Curl_safefree(chlg);
|
Curl_safefree(chlg);
|
||||||
|
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_LOGIN_DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup the challenge "input" security buffer */
|
/* Setup the challenge "input" security buffer */
|
||||||
@ -367,7 +367,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
|
|||||||
krb5->p_identity, NULL, NULL,
|
krb5->p_identity, NULL, NULL,
|
||||||
krb5->credentials, &expiry);
|
krb5->credentials, &expiry);
|
||||||
if(status != SEC_E_OK)
|
if(status != SEC_E_OK)
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_LOGIN_DENIED;
|
||||||
|
|
||||||
/* Allocate our new context handle */
|
/* Allocate our new context handle */
|
||||||
krb5->context = malloc(sizeof(CtxtHandle));
|
krb5->context = malloc(sizeof(CtxtHandle));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user