git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Replace deprecated CURLAUTH_GSSNEGOTIATE with CURLAUTH_NEGOTIATE.

From
Petr Stodulka <pstodulk@redhat.com>
Date
Sep 28, 2016, 21:20 UTC
Message-ID
<1475097623-13849-1-git-send-email-pstodulk@redhat.com>

Macro CURLAUTH_GSSNEGOTIATE is deprecated since cURL v7.38.0 and should be used CURLAUTH_NEGOTIATE instead. For compatibility with older versions of cURL is CURLAUTH_NEGOTIATE set as alias to CURLAUTH_GSSNEGOTIATE

Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
---
 http.c        | 4 ++--
 http.h        | 7 +++++++
 remote-curl.c | 2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/http.c b/http.c
index 82ed542..7c2d9ef 100644
--- a/http.c
+++ b/http.c
@@ -79,7 +79,7 @@ static struct {
 } proxy_authmethods[] = {
 	{ "basic", CURLAUTH_BASIC },
 	{ "digest", CURLAUTH_DIGEST },
-	{ "negotiate", CURLAUTH_GSSNEGOTIATE },
+	{ "negotiate", CURLAUTH_NEGOTIATE },
 	{ "ntlm", CURLAUTH_NTLM },
 #ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
 	{ "anyauth", CURLAUTH_ANY },
@@ -1277,7 +1277,7 @@ static int handle_curl_result(struct slot_results *results)
 			return HTTP_NOAUTH;
 		} else {
 #ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
-			http_auth_methods &= ~CURLAUTH_GSSNEGOTIATE;
+			http_auth_methods &= ~CURLAUTH_NEGOTIATE;
 #endif
 			return HTTP_REAUTH;
 		}
diff --git a/http.h b/http.h
index 5ab9d9c..bcc7d7d 100644
--- a/http.h
+++ b/http.h
@@ -42,6 +42,13 @@
 #endif
 
 /*
+ * Keep it compatible on system with cURL < 7.38.0
+ * */
+#ifndef CURLAUTH_NEGOTIATE
+#define CURLAUTH_NEGOTIATE CURLAUTH_GSSNEGOTIATE
+#endif
+
+/*
  * CURLOPT_USE_SSL was known as CURLOPT_FTP_SSL up to 7.16.4,
  * and the constants were known as CURLFTPSSL_*
 */
diff --git a/remote-curl.c b/remote-curl.c
index 6b83b77..d4fce63 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -542,7 +542,7 @@ static int post_rpc(struct rpc_state *rpc)
 		if (err != HTTP_OK)
 			return -1;
 
-		if (results.auth_avail & CURLAUTH_GSSNEGOTIATE)
+		if (results.auth_avail & CURLAUTH_NEGOTIATE)
 			needs_100_continue = 1;
 	}
 
-- 
2.5.5
Message 1 of 1 in “Replace deprecated CURLAUTH_GSSNEGOTIATE with CURLAUTH_NEGOTIATE.”
  1. Replace deprecated CURLAUTH_GSSNEGOTIATE with CURLAUTH_NEGOTIATE.Petr Stodulka, Sep 28, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.