summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2020-06-15 16:01:41 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2020-06-15 16:01:41 +0300
commit93cee30309588b62312debba714eec06ea5b2063 (patch)
treebb8b5676452bc45ccb7c1f8c7f027baf660628e7 /plugin
parentde20091f5cee6c018da37a6f4c2c57653d369ad6 (diff)
downloadmariadb-git-93cee30309588b62312debba714eec06ea5b2063.tar.gz
Check for krb5_xfree instead of krb5_free_unparsed_name
Use krb5_xfree if available, otherwise default to krb5_free_unparsed_name.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/auth_gssapi/CMakeLists.txt6
-rw-r--r--plugin/auth_gssapi/gssapi_server.cc2
2 files changed, 4 insertions, 4 deletions
diff --git a/plugin/auth_gssapi/CMakeLists.txt b/plugin/auth_gssapi/CMakeLists.txt
index 7d9e58e165f..c708606856d 100644
--- a/plugin/auth_gssapi/CMakeLists.txt
+++ b/plugin/auth_gssapi/CMakeLists.txt
@@ -21,9 +21,9 @@ ELSE()
SET(CMAKE_REQUIRED_INCLUDES ${GSSAPI_INCS})
SET(CMAKE_REQUIRED_LIBRARIES ${GSSAPI_LIBS})
INCLUDE(CheckCXXSymbolExists)
- CHECK_CXX_SYMBOL_EXISTS(krb5_free_unparsed_name "krb5.h" HAVE_KRB5_FREE_UNPARSED_NAME)
- IF(HAVE_KRB5_FREE_UNPARSED_NAME)
- ADD_DEFINITIONS(-DHAVE_KRB5_FREE_UNPARSED_NAME=1)
+ CHECK_CXX_SYMBOL_EXISTS(krb5_xfree "krb5.h" HAVE_KRB5_XFREE)
+ IF(HAVE_KRB5_XFREE)
+ ADD_DEFINITIONS(-DHAVE_KRB5_XFREE=1)
ENDIF()
ELSE()
diff --git a/plugin/auth_gssapi/gssapi_server.cc b/plugin/auth_gssapi/gssapi_server.cc
index 50c34ecc573..c1c4fa13e00 100644
--- a/plugin/auth_gssapi/gssapi_server.cc
+++ b/plugin/auth_gssapi/gssapi_server.cc
@@ -31,7 +31,7 @@ static void log_error( OM_uint32 major, OM_uint32 minor, const char *msg)
Generate default principal service name formatted as principal name "mariadb/server.fqdn@REALM"
*/
#include <krb5.h>
-#ifndef HAVE_KRB5_FREE_UNPARSED_NAME
+#ifdef HAVE_KRB5_XFREE
#define krb5_free_unparsed_name(a,b) krb5_xfree(b)
#endif
static char* get_default_principal_name()