{"thread":{"id":"44184","subject":"[PATCH] Replace deprecated CURLAUTH_GSSNEGOTIATE with CURLAUTH_NEGOTIATE.","startedAt":"2016-09-28T21:28:13Z","lastAt":"2016-09-28T21:28:13Z","messageCount":1,"participants":["Petr Stodulka"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"302840","messageId":"1475097623-13849-1-git-send-email-pstodulk@redhat.com","threadId":"44184","inReplyTo":null,"subject":"[PATCH] Replace deprecated CURLAUTH_GSSNEGOTIATE with CURLAUTH_NEGOTIATE.","fromName":"Petr Stodulka","fromEmail":"pstodulk@redhat.com","sentAt":"2016-09-28T21:20:23Z","receivedAt":"2016-09-28T21:28:13Z","isPatch":true,"sender":{"key":"pstodulk@redhat.com","avatar":"https://avatars.githubusercontent.com/u/1656374?v=4"},"body":"Macro CURLAUTH_GSSNEGOTIATE is deprecated since cURL v7.38.0 and\nshould be used CURLAUTH_NEGOTIATE instead. For compatibility\nwith older versions of cURL is CURLAUTH_NEGOTIATE set as alias\nto CURLAUTH_GSSNEGOTIATE\n\nSigned-off-by: Petr Stodulka <pstodulk@redhat.com>\n---\n http.c        | 4 ++--\n http.h        | 7 +++++++\n remote-curl.c | 2 +-\n 3 files changed, 10 insertions(+), 3 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex 82ed542..7c2d9ef 100644\n--- a/http.c\n+++ b/http.c\n@@ -79,7 +79,7 @@ static struct {\n } proxy_authmethods[] = {\n \t{ \"basic\", CURLAUTH_BASIC },\n \t{ \"digest\", CURLAUTH_DIGEST },\n-\t{ \"negotiate\", CURLAUTH_GSSNEGOTIATE },\n+\t{ \"negotiate\", CURLAUTH_NEGOTIATE },\n \t{ \"ntlm\", CURLAUTH_NTLM },\n #ifdef LIBCURL_CAN_HANDLE_AUTH_ANY\n \t{ \"anyauth\", CURLAUTH_ANY },\n@@ -1277,7 +1277,7 @@ static int handle_curl_result(struct slot_results *results)\n \t\t\treturn HTTP_NOAUTH;\n \t\t} else {\n #ifdef LIBCURL_CAN_HANDLE_AUTH_ANY\n-\t\t\thttp_auth_methods &= ~CURLAUTH_GSSNEGOTIATE;\n+\t\t\thttp_auth_methods &= ~CURLAUTH_NEGOTIATE;\n #endif\n \t\t\treturn HTTP_REAUTH;\n \t\t}\ndiff --git a/http.h b/http.h\nindex 5ab9d9c..bcc7d7d 100644\n--- a/http.h\n+++ b/http.h\n@@ -42,6 +42,13 @@\n #endif\n \n /*\n+ * Keep it compatible on system with cURL < 7.38.0\n+ * */\n+#ifndef CURLAUTH_NEGOTIATE\n+#define CURLAUTH_NEGOTIATE CURLAUTH_GSSNEGOTIATE\n+#endif\n+\n+/*\n  * CURLOPT_USE_SSL was known as CURLOPT_FTP_SSL up to 7.16.4,\n  * and the constants were known as CURLFTPSSL_*\n */\ndiff --git a/remote-curl.c b/remote-curl.c\nindex 6b83b77..d4fce63 100644\n--- a/remote-curl.c\n+++ b/remote-curl.c\n@@ -542,7 +542,7 @@ static int post_rpc(struct rpc_state *rpc)\n \t\tif (err != HTTP_OK)\n \t\t\treturn -1;\n \n-\t\tif (results.auth_avail & CURLAUTH_GSSNEGOTIATE)\n+\t\tif (results.auth_avail & CURLAUTH_NEGOTIATE)\n \t\t\tneeds_100_continue = 1;\n \t}\n \n-- \n2.5.5\n\n"}]}