]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
vauth: return CURLE_AUTH_ERROR on gss_init_sec_context() failure
authorKamil Dudka <kdudka@redhat.com>
Wed, 14 Aug 2019 07:47:17 +0000 (09:47 +0200)
committerKamil Dudka <kdudka@redhat.com>
Mon, 26 Aug 2019 11:43:21 +0000 (13:43 +0200)
This is a follow-up to https://github.com/curl/curl/pull/3864 .

Closes #4224

lib/http_negotiate.c
lib/vauth/spnego_gssapi.c
lib/vauth/spnego_sspi.c

index fe15dcefbc6ed7aee3b1c7985b3a400aefe975d3..8e1f3bf68589e4825524869037da54e28f2e4205 100644 (file)
@@ -148,7 +148,7 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
     }
     if(!neg_ctx->context) {
       result = Curl_input_negotiate(conn, proxy, "Negotiate");
-      if(result == CURLE_LOGIN_DENIED) {
+      if(result == CURLE_AUTH_ERROR) {
         /* negotiate auth failed, let's continue unauthenticated to stay
          * compatible with the behavior before curl-7_64_0-158-g6c6035532 */
         authp->done = TRUE;
index f05afca96f217a96daa4a74169d2cf7af5f8609c..ed7ce029ec3e02ef0a42384b37ee571a3d720edd 100644 (file)
@@ -170,7 +170,7 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
     Curl_gss_log_error(data, "gss_init_sec_context() failed: ",
                        major_status, minor_status);
 
-    return CURLE_LOGIN_DENIED;
+    return CURLE_AUTH_ERROR;
   }
 
   if(!output_token.value || !output_token.length) {
index 13d7a4cfe2e48b9936520b8c6f830a2894a0accb..13e20db39f794dc51fd50b4bea425b1134318b21 100644 (file)
@@ -165,7 +165,7 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
                                          nego->p_identity, NULL, NULL,
                                          nego->credentials, &expiry);
     if(nego->status != SEC_E_OK)
-      return CURLE_LOGIN_DENIED;
+      return CURLE_AUTH_ERROR;
 
     /* Allocate our new context handle */
     nego->context = calloc(1, sizeof(CtxtHandle));