← Commit list

1a81a8e478

Viktor Szakats
Viktor Szakats
2025-10-16
SUCCESS Duration: 217s

Subject

version: add GSS backend name and version

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

CMake/FindGSS.cmake+3 -0
@@ -128,6 +128,9 @@ if(NOT _gss_FOUND) # Not found by pkg-config. Let us take more traditional appr
# Older versions may not have the "--version" parameter. In this case we just do not care.
if(_gss_configure_failed)
set(_gss_version 0)
+ else()
+ # Strip prefix string to leave the version number only
+ string(REPLACE "Kerberos 5 release " "" _gss_version "${_gss_version}")
endif()
execute_process(COMMAND ${_gss_configure_script} "--vendor"
CMakeLists.txt+2 -0
@@ -1445,6 +1445,8 @@ if(CURL_USE_GSSAPI)
if(GSS_FLAVOUR STREQUAL "GNU")
set(HAVE_GSSGNU 1)
+ elseif(GSS_VERSION) # MIT
+ set(CURL_KRB5_VERSION "\"${GSS_VERSION}\"")
endif()
else()
message(WARNING "GSSAPI has been requested, but no supporting libraries found. Skipping.")
configure.ac+12 -0
@@ -1909,6 +1909,18 @@ if test x"$want_gss" = xyes; then
fi
fi
fi
+ gss_version=""
+ if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
+ gss_version=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --version | $SED 's/Kerberos 5 release //'`
+ elif test "$PKGCONFIG" != "no"; then
+ gss_version=`$PKGCONFIG --modversion mit-krb5-gssapi`
+ elif test -f "$KRB5CONFIG"; then
+ gss_version=`$KRB5CONFIG --version | $SED 's/Kerberos 5 release //'`
+ fi
+ if test -n "$gss_version"; then
+ AC_MSG_NOTICE([GSS-API MIT Kerberos version detected: $gss_version])
+ AC_DEFINE_UNQUOTED([CURL_KRB5_VERSION], ["$gss_version"], [MIT Kerberos version])
+ fi
else
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
LDFLAGSPC="$LDFLAGSPC $GSSAPI_LIB_DIR"
lib/curl_config.h.cmake+3 -0
@@ -318,6 +318,9 @@
/* if you have the GNU gssapi libraries */
#cmakedefine HAVE_GSSGNU 1
+/* MIT Kerberos version */
+#cmakedefine CURL_KRB5_VERSION ${CURL_KRB5_VERSION}
+
/* Define to 1 if you have the <ifaddrs.h> header file. */
#cmakedefine HAVE_IFADDRS_H 1
lib/version.c+23 -0
@@ -77,6 +77,14 @@
#include <gsasl.h>
#endif
+#ifdef HAVE_GSSAPI
+# ifdef HAVE_GSSGNU
+# include <gss.h>
+# else
+# include <gssapi/gssapi.h>
+# endif
+#endif
+
#ifdef USE_OPENLDAP
#include <ldap.h>
#endif
@@ -208,6 +216,9 @@ char *curl_version(void)
#ifdef USE_GSASL
char gsasl_buf[30];
#endif
+#ifdef HAVE_GSSAPI
+ char gss_buf[40];
+#endif
#ifdef USE_OPENLDAP
char ldap_buf[30];
#endif
@@ -274,6 +285,18 @@ char *curl_version(void)
gsasl_check_version(NULL));
src[i++] = gsasl_buf;
#endif
+#ifdef HAVE_GSSAPI
+#ifdef HAVE_GSSGNU
+ curl_msnprintf(gss_buf, sizeof(gss_buf), "libgss/%s",
+ GSS_VERSION);
+#elif defined(CURL_KRB5_VERSION)
+ curl_msnprintf(gss_buf, sizeof(gss_buf), "mit-krb5/%s",
+ CURL_KRB5_VERSION);
+#else
+ curl_msnprintf(gss_buf, sizeof(gss_buf), "mit-krb5");
+#endif
+ src[i++] = gss_buf;
+#endif /* HAVE_GSSAPI */
#ifdef USE_OPENLDAP
oldap_version(ldap_buf, sizeof(ldap_buf));
src[i++] = ldap_buf;