Commit 1ac64b75 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-9557 - fix compilation errors due to missing krb5_free_unparsed_name() in...

MDEV-9557 - fix compilation errors due to missing krb5_free_unparsed_name() in old versions of Heimdal Kerberos
parent d80b8442
......@@ -17,6 +17,15 @@ ELSE()
SET(GSSAPI_CLIENT gssapi_client.cc)
SET(GSSAPI_SERVER gssapi_server.cc)
SET(GSSAPI_ERRMSG gssapi_errmsg.cc)
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)
ENDIF()
ELSE()
# Can't build plugin
RETURN()
......
......@@ -39,7 +39,7 @@ if(GSSAPI_LIBS AND GSSAPI_FLAVOR)
else(GSSAPI_LIBS AND GSSAPI_FLAVOR)
find_program(KRB5_CONFIG NAMES krb5-config PATHS
find_program(KRB5_CONFIG NAMES krb5-config heimdal-krb5-config PATHS
/opt/local/bin
ONLY_CMAKE_FIND_ROOT_PATH # this is required when cross compiling with cmake 2.6 and ignored with cmake 2.4, Alex
)
......
......@@ -31,6 +31,9 @@ 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
#define krb5_free_unparsed_name(a,b) krb5_xfree(b)
#endif
static char* get_default_principal_name()
{
static char default_name[1024];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment