From 3620db9b0a9b56a2e80ea3fc6872415c1d039a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 11 Feb 2021 16:41:48 +0200 Subject: [PATCH] Ignore the default value of connector_plugindir The default value isn't a valid path and should be changed later on. --- server/core/gateway.cc | 11 ++++++++++- test/maxscale_test.cnf | 2 -- test/maxscale_test_secondary.cnf | 2 -- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/server/core/gateway.cc b/server/core/gateway.cc index 00bb8b535..5d311dfb0 100644 --- a/server/core/gateway.cc +++ b/server/core/gateway.cc @@ -2696,6 +2696,16 @@ bool handle_path_arg(char** dest, const char* path, const char* arg, bool rd, bo bool check_paths() { + // The default path for the connector_plugindir isn't valid. This doesn't matter that much as we don't + // include the plugins in the installation. + if (strcmp(get_connector_plugindir(), default_connector_plugindir) != 0) + { + if (!check_dir_access(get_connector_plugindir(), true, false)) + { + return false; + } + } + return check_dir_access(get_logdir(), true, false) && check_dir_access(get_cachedir(), true, true) && check_dir_access(get_configdir(), true, false) @@ -2704,7 +2714,6 @@ bool check_paths() && check_dir_access(get_langdir(), true, false) && check_dir_access(get_piddir(), true, true) && check_dir_access(get_config_persistdir(), true, true) - && check_dir_access(get_connector_plugindir(), true, false) && check_dir_access(get_libdir(), true, false) && check_dir_access(get_execdir(), true, false); } diff --git a/test/maxscale_test.cnf b/test/maxscale_test.cnf index 8eb69cae6..f425b26ef 100644 --- a/test/maxscale_test.cnf +++ b/test/maxscale_test.cnf @@ -8,8 +8,6 @@ language=@CMAKE_INSTALL_PREFIX@/lib/maxscale/ piddir=@CMAKE_INSTALL_PREFIX@/run/maxscale/ persistdir=@CMAKE_INSTALL_PREFIX@/lib/maxscale/maxscale.cnf.d/ module_configdir=@CMAKE_INSTALL_PREFIX@/etc/maxscale.modules.d/ -# This isn't really correct but it's OK as long as it's an empty directory -connector_plugindir=@CMAKE_INSTALL_PREFIX@/etc/maxscale.modules.d/ admin_auth=false [server1] diff --git a/test/maxscale_test_secondary.cnf b/test/maxscale_test_secondary.cnf index 76877cfcd..a81fba70e 100644 --- a/test/maxscale_test_secondary.cnf +++ b/test/maxscale_test_secondary.cnf @@ -8,8 +8,6 @@ language=@CMAKE_INSTALL_PREFIX@/secondary/lib/maxscale/ piddir=@CMAKE_INSTALL_PREFIX@/secondary/run/maxscale persistdir=@CMAKE_INSTALL_PREFIX@/secondary/lib/maxscale/maxscale.cnf.d/ module_configdir=@CMAKE_INSTALL_PREFIX@/secondary/etc/maxscale.modules.d/ -# This isn't really correct but it's OK as long as it's an empty directory -connector_plugindir=@CMAKE_INSTALL_PREFIX@/secondary/etc/maxscale.modules.d/ admin_auth=false admin_port=8990