Move all authenticators into separate subdirectories

This commit is contained in:
Johan Wikman
2016-12-01 15:41:15 +02:00
parent aef6c7b099
commit 1707684992
20 changed files with 54 additions and 53 deletions

View File

@ -0,0 +1,6 @@
if(BUILD_CDC)
add_library(CDCPlainAuth SHARED cdc_plain_auth.c)
target_link_libraries(CDCPlainAuth maxscale-common)
set_target_properties(CDCPlainAuth PROPERTIES VERSION "1.0.0")
install_module(CDCPlainAuth core)
endif()

View File

@ -1,49 +1,11 @@
add_subdirectory(CDCPlainAuth)
add_subdirectory(GSSAPI)
add_subdirectory(HTTPAuth)
add_subdirectory(MaxAdminAuth)
add_subdirectory(MySQLAuth) add_subdirectory(MySQLAuth)
add_subdirectory(MySQLBackendAuth)
add_library(MySQLBackendAuth SHARED mysql_backend_auth.c) add_subdirectory(NullAuthAllow)
target_link_libraries(MySQLBackendAuth maxscale-common MySQLCommon) add_subdirectory(NullAuthDeny)
set_target_properties(MySQLBackendAuth PROPERTIES VERSION "1.0.0")
install_module(MySQLBackendAuth core)
if (GSSAPI_FOUND AND SQLITE_FOUND)
if (NOT SQLITE_VERSION VERSION_LESS "3.7.7")
include_directories(${GSSAPI_INCS})
include_directories(${SQLITE_INCLUDE_DIR})
add_library(GSSAPIAuth SHARED gssapi_auth.c gssapi_auth_common.c)
target_link_libraries(GSSAPIAuth maxscale-common ${GSSAPI_LIBS} ${SQLITE_LIBRARIES} MySQLCommon)
set_target_properties(GSSAPIAuth PROPERTIES VERSION "1.0.0")
install_module(GSSAPIAuth core)
add_library(GSSAPIBackendAuth SHARED gssapi_backend_auth.c gssapi_auth_common.c)
target_link_libraries(GSSAPIBackendAuth maxscale-common ${GSSAPI_LIBS} MySQLCommon)
set_target_properties(GSSAPIBackendAuth PROPERTIES VERSION "1.0.0")
install_module(GSSAPIBackendAuth core)
else()
message(STATUS "Minimum requires SQLite version for GSSAPIAuth is 3.7.7, current SQLite version is ${SQLITE_VERSION}")
endif()
endif()
add_library(NullAuthAllow SHARED null_auth_allow.c)
target_link_libraries(NullAuthAllow maxscale-common)
set_target_properties(NullAuthAllow PROPERTIES VERSION "1.0.0")
install_module(NullAuthAllow core)
add_library(NullAuthDeny SHARED null_auth_deny.c)
target_link_libraries(NullAuthDeny maxscale-common)
set_target_properties(NullAuthDeny PROPERTIES VERSION "1.0.0")
install_module(NullAuthDeny core)
add_library(MaxAdminAuth SHARED max_admin_auth.c)
target_link_libraries(MaxAdminAuth maxscale-common)
set_target_properties(MaxAdminAuth PROPERTIES VERSION "1.0.0")
install_module(MaxAdminAuth core)
add_library(HTTPAuth SHARED http_auth.c)
target_link_libraries(HTTPAuth maxscale-common)
set_target_properties(HTTPAuth PROPERTIES VERSION "1.0.0")
install_module(HTTPAuth core)
# if(BUILD_TESTS) # if(BUILD_TESTS)
# add_library(testprotocol SHARED testprotocol.c) # add_library(testprotocol SHARED testprotocol.c)
@ -51,10 +13,4 @@ install_module(HTTPAuth core)
# target_link_libraries(testprotocol maxscale-common) # target_link_libraries(testprotocol maxscale-common)
# install_module(testprotocol core) # install_module(testprotocol core)
# endif() # endif()
if(BUILD_CDC)
add_library(CDCPlainAuth SHARED cdc_plain_auth.c)
target_link_libraries(CDCPlainAuth maxscale-common)
set_target_properties(CDCPlainAuth PROPERTIES VERSION "1.0.0")
install_module(CDCPlainAuth core)
endif()

View File

@ -0,0 +1,11 @@
if (GSSAPI_FOUND AND SQLITE_FOUND)
if (NOT SQLITE_VERSION VERSION_LESS "3.7.7")
include_directories(${GSSAPI_INCS})
include_directories(${SQLITE_INCLUDE_DIR})
add_subdirectory(GSSAPIAuth)
add_subdirectory(GSSAPIBackendAuth)
else()
message(STATUS "Minimum requires SQLite version for GSSAPIAuth is 3.7.7, current SQLite version is ${SQLITE_VERSION}")
endif()
endif()

View File

@ -0,0 +1,4 @@
add_library(GSSAPIAuth SHARED gssapi_auth.c ../gssapi_auth_common.c)
target_link_libraries(GSSAPIAuth maxscale-common ${GSSAPI_LIBS} ${SQLITE_LIBRARIES} MySQLCommon)
set_target_properties(GSSAPIAuth PROPERTIES VERSION "1.0.0")
install_module(GSSAPIAuth core)

View File

@ -19,7 +19,7 @@
#include <maxscale/secrets.h> #include <maxscale/secrets.h>
#include <maxscale/mysql_utils.h> #include <maxscale/mysql_utils.h>
#include <sqlite3.h> #include <sqlite3.h>
#include "gssapi_auth.h" #include "../gssapi_auth.h"
/** Default timeout is one minute */ /** Default timeout is one minute */
#define MXS_SQLITE_BUSY_TIMEOUT 60000 #define MXS_SQLITE_BUSY_TIMEOUT 60000

View File

@ -0,0 +1,4 @@
add_library(GSSAPIBackendAuth SHARED gssapi_backend_auth.c ../gssapi_auth_common.c)
target_link_libraries(GSSAPIBackendAuth maxscale-common ${GSSAPI_LIBS} MySQLCommon)
set_target_properties(GSSAPIBackendAuth PROPERTIES VERSION "1.0.0")
install_module(GSSAPIBackendAuth core)

View File

@ -16,7 +16,7 @@
#include <maxscale/dcb.h> #include <maxscale/dcb.h>
#include <maxscale/log_manager.h> #include <maxscale/log_manager.h>
#include <maxscale/protocol/mysql.h> #include <maxscale/protocol/mysql.h>
#include "gssapi_auth.h" #include "../gssapi_auth.h"
/** /**
* @file gssapi_backend_auth.c - GSSAPI backend authenticator * @file gssapi_backend_auth.c - GSSAPI backend authenticator

View File

@ -0,0 +1,4 @@
add_library(HTTPAuth SHARED http_auth.c)
target_link_libraries(HTTPAuth maxscale-common)
set_target_properties(HTTPAuth PROPERTIES VERSION "1.0.0")
install_module(HTTPAuth core)

View File

@ -0,0 +1,4 @@
add_library(MaxAdminAuth SHARED max_admin_auth.c)
target_link_libraries(MaxAdminAuth maxscale-common)
set_target_properties(MaxAdminAuth PROPERTIES VERSION "1.0.0")
install_module(MaxAdminAuth core)

View File

@ -0,0 +1,4 @@
add_library(MySQLBackendAuth SHARED mysql_backend_auth.c)
target_link_libraries(MySQLBackendAuth maxscale-common MySQLCommon)
set_target_properties(MySQLBackendAuth PROPERTIES VERSION "1.0.0")
install_module(MySQLBackendAuth core)

View File

@ -0,0 +1,4 @@
add_library(NullAuthAllow SHARED null_auth_allow.c)
target_link_libraries(NullAuthAllow maxscale-common)
set_target_properties(NullAuthAllow PROPERTIES VERSION "1.0.0")
install_module(NullAuthAllow core)

View File

@ -0,0 +1,4 @@
add_library(NullAuthDeny SHARED null_auth_deny.c)
target_link_libraries(NullAuthDeny maxscale-common)
set_target_properties(NullAuthDeny PROPERTIES VERSION "1.0.0")
install_module(NullAuthDeny core)