mirror of
https://github.com/MariaDB/server.git
synced 2026-04-25 09:45:31 +02:00
HASHICORP_KEY_MANAGEMENT: MDEV-33420 post-fix
Compilation correction after MDEV-33420.
This commit is contained in:
parent
3f9f5ca48e
commit
8fd515e0d2
2 changed files with 11 additions and 2 deletions
|
|
@ -1,16 +1,21 @@
|
|||
FIND_PACKAGE(CURL)
|
||||
IF(NOT CURL_FOUND)
|
||||
# Can't build plugin
|
||||
MESSAGE_ONCE(WARNING "Hashicorp Key Management plugin requires curl development package")
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
SET_PACKAGE_PROPERTIES(CURL PROPERTIES TYPE REQUIRED)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
|
||||
|
||||
set(CPACK_RPM_hashicorp-key-management_PACKAGE_SUMMARY "Hashicorp Key Management plugin for MariaDB" PARENT_SCOPE)
|
||||
set(CPACK_RPM_hashicorp-key-management_PACKAGE_DESCRIPTION "This encryption plugin uses Hashicorp Vault for storing encryption
|
||||
keys for MariaDB Data-at-Rest encryption." PARENT_SCOPE)
|
||||
|
||||
MYSQL_ADD_PLUGIN(HASHICORP_KEY_MANAGEMENT
|
||||
hashicorp_key_management_plugin.cc
|
||||
LINK_LIBRARIES CURL::libcurl
|
||||
LINK_LIBRARIES ${CURL_LIBRARIES}
|
||||
CONFIG hashicorp_key_management.cnf
|
||||
COMPONENT hashicorp-key-management
|
||||
MODULE_ONLY)
|
||||
|
|
|
|||
|
|
@ -987,7 +987,11 @@ int HCData::init ()
|
|||
bool not_equal= token_env != NULL && strcmp(token_env, token) != 0;
|
||||
if (token_env == NULL || not_equal)
|
||||
{
|
||||
setenv("VAULT_TOKEN", token, 1);
|
||||
#if defined(HAVE_SETENV) || !defined(_WIN32)
|
||||
setenv("VAULT_TOKEN", token, 1);
|
||||
#else
|
||||
_putenv_s("VAULT_TOKEN", token);
|
||||
#endif
|
||||
if (not_equal)
|
||||
{
|
||||
my_printf_error(ER_UNKNOWN_ERROR, PLUGIN_ERROR_HEADER
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue