Skip to content

Commit

Permalink
Check for krb5_xfree instead of krb5_free_unparsed_name
Browse files Browse the repository at this point in the history
Use krb5_xfree if available, otherwise default to
krb5_free_unparsed_name.
  • Loading branch information
cvicentiu committed Jun 15, 2020
1 parent de20091 commit 93cee30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions plugin/auth_gssapi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion plugin/auth_gssapi/gssapi_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 93cee30

Please sign in to comment.