2021-11-22 19:34:47 +07:00
|
|
|
|
|
|
|
SET(CPACK_RPM_gssapi-server_PACKAGE_SUMMARY "GSSAPI authentication plugin for MariaDB server" PARENT_SCOPE)
|
|
|
|
SET(CPACK_RPM_gssapi-server_PACKAGE_DESCRIPTION "The gssapi authentication plugin allows the user to authenticate with services
|
|
|
|
that use the Generic Security Services Application Program Interface (GSSAPI).
|
|
|
|
The gssapi authentication plugin is most often used for authenticating with Microsoft Active Directory." PARENT_SCOPE)
|
|
|
|
|
2016-01-14 13:31:08 +01:00
|
|
|
IF (WIN32)
|
|
|
|
SET(USE_SSPI 1)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF(USE_SSPI)
|
|
|
|
SET(GSSAPI_LIBS secur32)
|
|
|
|
ADD_DEFINITIONS(-DPLUGIN_SSPI)
|
|
|
|
SET(GSSAPI_CLIENT sspi_client.cc)
|
|
|
|
SET(GSSAPI_SERVER sspi_server.cc)
|
|
|
|
SET(GSSAPI_ERRMSG sspi_errmsg.cc)
|
|
|
|
ELSE()
|
|
|
|
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|
|
|
FIND_PACKAGE(GSSAPI)
|
2017-08-09 21:39:18 +02:00
|
|
|
SET_PACKAGE_PROPERTIES(GSSAPI PROPERTIES TYPE OPTIONAL)
|
2016-01-14 13:31:08 +01:00
|
|
|
IF(GSSAPI_FOUND)
|
|
|
|
INCLUDE_DIRECTORIES(${GSSAPI_INCS})
|
|
|
|
ADD_DEFINITIONS(-DPLUGIN_GSSAPI)
|
|
|
|
SET(GSSAPI_CLIENT gssapi_client.cc)
|
|
|
|
SET(GSSAPI_SERVER gssapi_server.cc)
|
|
|
|
SET(GSSAPI_ERRMSG gssapi_errmsg.cc)
|
2016-02-16 12:55:45 +00:00
|
|
|
|
2021-01-19 16:08:46 +07:00
|
|
|
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
2020-10-23 18:42:26 +07:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(
|
|
|
|
${GSSAPI_CLIENT} ${GSSAPI_SERVER} ${GSSAPI_ERRMSG}
|
|
|
|
PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations")
|
|
|
|
ENDIF()
|
2016-02-16 12:55:45 +00:00
|
|
|
SET(CMAKE_REQUIRED_INCLUDES ${GSSAPI_INCS})
|
|
|
|
SET(CMAKE_REQUIRED_LIBRARIES ${GSSAPI_LIBS})
|
2020-06-03 21:52:17 +02:00
|
|
|
SET(CMAKE_REQUIRED_FLAGS "-Werror -Wall")
|
2016-02-16 12:55:45 +00:00
|
|
|
INCLUDE(CheckCXXSymbolExists)
|
2020-06-15 16:01:41 +03:00
|
|
|
CHECK_CXX_SYMBOL_EXISTS(krb5_xfree "krb5.h" HAVE_KRB5_XFREE)
|
|
|
|
IF(HAVE_KRB5_XFREE)
|
|
|
|
ADD_DEFINITIONS(-DHAVE_KRB5_XFREE=1)
|
2016-02-16 12:55:45 +00:00
|
|
|
ENDIF()
|
|
|
|
|
2016-01-14 13:31:08 +01:00
|
|
|
ELSE()
|
|
|
|
# Can't build plugin
|
|
|
|
RETURN()
|
|
|
|
ENDIF()
|
|
|
|
ENDIF ()
|
|
|
|
|
|
|
|
|
|
|
|
MYSQL_ADD_PLUGIN(auth_gssapi server_plugin.cc ${GSSAPI_SERVER} ${GSSAPI_ERRMSG}
|
2016-01-18 19:30:46 +01:00
|
|
|
LINK_LIBRARIES ${GSSAPI_LIBS}
|
|
|
|
COMPONENT gssapi-server
|
2016-01-14 13:31:08 +01:00
|
|
|
MODULE_ONLY)
|
|
|
|
|
2016-09-04 13:35:14 +02:00
|
|
|
# disabled in favor of libmariadb/plugins/auth/auth_gssapi_client.c
|
|
|
|
#
|
|
|
|
#MYSQL_ADD_PLUGIN(auth_gssapi_client client_plugin.cc ${GSSAPI_CLIENT} ${GSSAPI_ERRMSG}
|
|
|
|
# LINK_LIBRARIES ${GSSAPI_LIBS COMPONENT ClientPlugins}
|
|
|
|
# COMPONENT gssapi-client
|
|
|
|
# CLIENT
|
|
|
|
# MODULE_ONLY)
|