]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
kerberos: bump minimum to 1.3 (2003-07-08), drop legacy logic
authorViktor Szakats <commit@vsz.me>
Fri, 10 Oct 2025 01:09:16 +0000 (03:09 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 10 Oct 2025 17:47:08 +0000 (19:47 +0200)
Previous minimum was: 1.2.4 (2002-02-28)

- assume `gssapi/gssapi.h` header for MIT Kerberos.

  Drop logic detecting this header, and drop alternate logic including
  a bare "gssapi.h". Bare `gssapi.h` is Heimdal-specific. MIT Kerberos
  added support for it for Heimdal compatibility on 2006-11-09,
  redirecting to `gssapi/gssapi.h`. MIT Kerberos supported the latter
  header in the 1990s already.

  Ref: 40e1a016f92903c731f07325bc1f9c6416ae1ac3 (2008-03-06)
  Ref: https://github.com/krb5/krb5/commit/d11935200186040132e05e2beaaba20a770ee3ef (2006-11-09)

- configure.ac: stop using `HAVE_GSSAPI_GSSAPI_H`.

  Added in 2010 to support "ancient distros such as RHEL-3" where
  `gssapi/gssapi_krb5.h` did not include `gssapi/gssapi.h`.

  MIT Kerberos includes it since commit:
  https://github.com/krb5/krb5/commit/d9e959edfa8da7cab3bde96c9c4ca39beaf8db69 (2003-03-06)
  Released in 1.3 (2003-07-08).

  Bump minimum required version to avoid this issue.

  Reverts cca192e58f9ed7c4b33c1c991f69ff830c58b38f (2010-04-16)

Ref: https://web.mit.edu/kerberos/dist/historic.html
Ref: https://sources.debian.org/src/krb5/

Closes #18992

.github/scripts/cmp-config.pl
CMakeLists.txt
configure.ac
docs/INTERNALS.md
lib/curl_config.h.cmake
lib/urldata.h
lib/vauth/vauth.h

index 4284fcaee70b3f69ef6a1759d7114ae224e71d12..3ad0570e28392604179f85e69cc884c838169ea0 100755 (executable)
@@ -46,6 +46,7 @@ my %remove = (
     '#define HAVE_BROTLI_DECODE_H 1' => 1,
     '#define HAVE_DLFCN_H 1' => 1,
     '#define HAVE_GSSAPI_GSSAPI_GENERIC_H 1' => 1,
+    '#define HAVE_GSSAPI_GSSAPI_H 1' => 1,
     '#define HAVE_GSSAPI_GSSAPI_KRB5_H 1' => 1,
     '#define HAVE_INTTYPES_H 1' => 1,
     '#define HAVE_LDAP_H 1' => 1,
index 387dd57dc27d398db6df6c806680f1ee5271aa35..b48b0452842de4191c0863f882b3a663eb8dd104 100644 (file)
@@ -1442,11 +1442,6 @@ if(CURL_USE_GSSAPI)
 
     if(GSS_FLAVOUR STREQUAL "GNU")
       set(HAVE_GSSGNU 1)
-    else()  # MIT
-      cmake_push_check_state()
-      list(APPEND CMAKE_REQUIRED_INCLUDES "${GSS_INCLUDE_DIRS}")
-      check_include_file("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
-      cmake_pop_check_state()
     endif()
   else()
     message(WARNING "GSSAPI has been requested, but no supporting libraries found. Skipping.")
index c8843b5b46cac1e3314db16d149266ba6e34711b..0880552cfbac8761e92eb4a4f06c663abda644ac 100644 (file)
@@ -1841,17 +1841,10 @@ if test x"$want_gss" = xyes; then
     ],
     [
       dnl not found, check for MIT
-      AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
       AC_CHECK_HEADERS(
-        [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
+        [gssapi/gssapi.h gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
         [],
-        [not_mit=1],
-        [
-          AC_INCLUDES_DEFAULT
-          #ifdef HAVE_GSSAPI_GSSAPI_H
-          #include <gssapi/gssapi.h>
-          #endif
-        ])
+        [not_mit=1])
       if test "x$not_mit" = "x1"; then
         dnl MIT not found
         AC_MSG_ERROR([MIT or GNU GSS library required, but not found])
index 3ad1b3e8c2a4e0eb270e8cfc60af38154b991ab7..b6b00e924a73f891c15db36b12f533b38e77a73a 100644 (file)
@@ -35,7 +35,7 @@ versions of libs and build tools.
  - libidn2      2.0.0
  - wolfSSL      3.4.6
  - OpenLDAP     2.0
- - MIT Kerberos 1.2.4
+ - MIT Kerberos 1.3
  - nghttp2      1.15.0
 
 ## Build tools
index 3f0bcf22ee6206968ecab787661c2f7b508fd158..be6fe4176e269c4f06e17d2d8853dafbcadfc665 100644 (file)
 /* if you have the gssapi libraries */
 #cmakedefine HAVE_GSSAPI 1
 
-/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
-#cmakedefine HAVE_GSSAPI_GSSAPI_H 1
-
 /* if you have the GNU gssapi libraries */
 #cmakedefine HAVE_GSSGNU 1
 
index cdf028853eab312abbfb705d92fd6b5f13ad3c4e..b6b8f6f8fe3de1d83851acfdf0114c2a663c9e89 100644 (file)
@@ -190,10 +190,8 @@ typedef CURLcode (Curl_recv)(struct Curl_easy *data,   /* transfer */
 #ifdef HAVE_GSSAPI
 # ifdef HAVE_GSSGNU
 #  include <gss.h>
-# elif defined HAVE_GSSAPI_GSSAPI_H
-#  include <gssapi/gssapi.h>
 # else
-#  include <gssapi.h>
+#  include <gssapi/gssapi.h>
 # endif
 #endif
 
index 26e5adc6281f22bd011dc9df96c05b3a8b26cb07..9a33ca0c23172a72d87ab9022c6211d5dba8dc5a 100644 (file)
@@ -236,10 +236,8 @@ CURLcode Curl_auth_create_xoauth_bearer_message(const char *user,
 #ifdef HAVE_GSSAPI
 # ifdef HAVE_GSSGNU
 #  include <gss.h>
-# elif defined HAVE_GSSAPI_GSSAPI_H
-#  include <gssapi/gssapi.h>
 # else
-#  include <gssapi.h>
+#  include <gssapi/gssapi.h>
 # endif
 #endif