diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-10-29 14:14:17 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-10-29 14:26:48 +0000 |
commit | f3fc3d021d56f4842d4f4ce556ace446b8496e3f (patch) | |
tree | 31ea467538cabefac96aa3981aac8e43c44bce52 | |
parent | f7e24683c47381ce32bfa5a3a01ff737483373c9 (diff) |
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.
-rw-r--r-- | lib/curl_ntlm_msgs.c | 2 | ||||
-rw-r--r-- | lib/curl_sasl_sspi.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c index 92211aa97..14ddc5f9c 100644 --- a/lib/curl_ntlm_msgs.c +++ b/lib/curl_ntlm_msgs.c @@ -477,7 +477,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp, ntlm->p_identity, NULL, NULL, ntlm->credentials, &expiry); if(status != SEC_E_OK) - return CURLE_OUT_OF_MEMORY; + return CURLE_LOGIN_DENIED; /* Allocate our new context handle */ ntlm->context = malloc(sizeof(CtxtHandle)); diff --git a/lib/curl_sasl_sspi.c b/lib/curl_sasl_sspi.c index 9aa84d77f..21edcd65d 100644 --- a/lib/curl_sasl_sspi.c +++ b/lib/curl_sasl_sspi.c @@ -210,7 +210,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, Curl_safefree(resp); Curl_safefree(chlg); - return CURLE_OUT_OF_MEMORY; + return CURLE_LOGIN_DENIED; } /* 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->credentials, &expiry); if(status != SEC_E_OK) - return CURLE_OUT_OF_MEMORY; + return CURLE_LOGIN_DENIED; /* Allocate our new context handle */ krb5->context = malloc(sizeof(CtxtHandle)); |