tdf#150082: LO Base MariaDB/MySQL connector don't accept auth via gssapi
Exclude Windows since we're not sure gssapi.h is available (at least Jenkins Windows machine doesn't have it) Change-Id: Iba396f77b07dce4291de5eb0e6ad7c0c25e6c3c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159954 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -2725,6 +2725,7 @@ AC_ARG_WITH(locales,
|
||||
,)
|
||||
|
||||
# Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5
|
||||
# and also by Mariadb/Mysql since LibO 24.8
|
||||
libo_FUZZ_ARG_WITH(krb5,
|
||||
AS_HELP_STRING([--with-krb5],
|
||||
[Enable MIT Kerberos 5 support in modules that support it.
|
||||
@@ -10229,6 +10230,11 @@ if test "$ENABLE_MARIADBC" = "TRUE"; then
|
||||
dnl ===================================================================
|
||||
dnl Check for system MariaDB
|
||||
dnl ===================================================================
|
||||
|
||||
if test "$with_gssapi" = "yes" -a "$enable_openssl" = "no"; then
|
||||
AC_MSG_ERROR([GSSAPI needs OpenSSL, but --disable-openssl was given.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([which MariaDB to use])
|
||||
if test "$with_system_mariadb" = "yes"; then
|
||||
AC_MSG_RESULT([external])
|
||||
@@ -10277,10 +10283,26 @@ if test "$ENABLE_MARIADBC" = "TRUE"; then
|
||||
/g' | grep -E '(mysqlclient|mariadb)')
|
||||
if test "$_os" = "Darwin"; then
|
||||
LIBMARIADB=${LIBMARIADB}.dylib
|
||||
if test "$with_gssapi" != "no"; then
|
||||
WITH_GSSAPI=TRUE
|
||||
save_LIBS=$LIBS
|
||||
AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
|
||||
[AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
|
||||
GSSAPI_LIBS=$LIBS
|
||||
LIBS=$save_LIBS
|
||||
fi
|
||||
elif test "$_os" = "WINNT"; then
|
||||
LIBMARIADB=${LIBMARIADB}.dll
|
||||
else
|
||||
LIBMARIADB=${LIBMARIADB}.so
|
||||
if test "$with_gssapi" != "no"; then
|
||||
WITH_GSSAPI=TRUE
|
||||
save_LIBS=$LIBS
|
||||
AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
|
||||
[AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
|
||||
GSSAPI_LIBS=$LIBS
|
||||
LIBS=$save_LIBS
|
||||
fi
|
||||
fi
|
||||
LIBMARIADB_PATH=$($MARIADBCONFIG --variable=pkglibdir)
|
||||
AC_MSG_CHECKING([for $LIBMARIADB in $LIBMARIADB_PATH])
|
||||
|
||||
@@ -23,6 +23,7 @@ $(eval $(call gb_Library_set_include,mysqlc,\
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_add_libs,mysqlc,\
|
||||
$(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
|
||||
$(if $(filter-out WNT,$(OS)),$(if $(filter HAIKU MACOSX SOLARIS,$(OS)),\
|
||||
-lz -lm,-rdynamic -lz -lcrypt -lm)) \
|
||||
$(if $(filter LINUX,$(OS)),-ldl,) \
|
||||
|
||||
@@ -53,6 +53,11 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
|
||||
UnpackedTarball/mariadb-connector-c/libmariadb/ma_net \
|
||||
UnpackedTarball/mariadb-connector-c/libmariadb/ma_password \
|
||||
UnpackedTarball/mariadb-connector-c/libmariadb/ma_pvio \
|
||||
$(ifneq $(filter $(OS),WNT), \
|
||||
UnpackedTarball/mariadb-connector-c/plugins/auth/auth_gssapi_client \
|
||||
UnpackedTarball/mariadb-connector-c/plugins/auth/gssapi_client \
|
||||
UnpackedTarball/mariadb-connector-c/plugins/auth/gssapi_errmsg \
|
||||
) \
|
||||
UnpackedTarball/mariadb-connector-c/libmariadb/ma_sha1 \
|
||||
UnpackedTarball/mariadb-connector-c/libmariadb/ma_stmt_codec \
|
||||
UnpackedTarball/mariadb-connector-c/libmariadb/ma_string \
|
||||
@@ -65,6 +70,10 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
|
||||
UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin \
|
||||
UnpackedTarball/mariadb-connector-c/plugins/auth/my_auth \
|
||||
UnpackedTarball/mariadb-connector-c/plugins/auth/caching_sha2_pw \
|
||||
$(ifneq $(filter $(OS),WNT), \
|
||||
UnpackedTarball/mariadb-connector-c/plugins/auth/gssapi_client \
|
||||
UnpackedTarball/mariadb-connector-c/plugins/auth/gssapi_errmsg \
|
||||
) \
|
||||
UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_socket \
|
||||
$(if $(filter $(OS),WNT), \
|
||||
UnpackedTarball/mariadb-connector-c/libmariadb/win32_errmsg \
|
||||
|
||||
@@ -36,6 +36,9 @@ $(eval $(call gb_UnpackedTarball_set_post_action,mariadb-connector-c, \
|
||||
extern struct st_mysql_client_plugin pvio_socket_client_plugin\; \
|
||||
extern struct st_mysql_client_plugin caching_sha2_password_client_plugin\; \
|
||||
extern struct st_mysql_client_plugin mysql_native_password_client_plugin\; \
|
||||
$(ifneq $(filter WNT,$(OS)), \
|
||||
extern struct st_mysql_client_plugin_AUTHENTICATION auth_gssapi_client_client_plugin\; \
|
||||
) \
|
||||
$(if $(filter WNT,$(OS)), \
|
||||
extern struct st_mysql_client_plugin pvio_shmem_client_plugin\; \
|
||||
extern struct st_mysql_client_plugin pvio_npipe_client_plugin\; \
|
||||
@@ -45,6 +48,9 @@ $(eval $(call gb_UnpackedTarball_set_post_action,mariadb-connector-c, \
|
||||
(struct st_mysql_client_plugin *)\&pvio_socket_client_plugin$(COMMA) \
|
||||
(struct st_mysql_client_plugin *)\&caching_sha2_password_client_plugin$(COMMA) \
|
||||
(struct st_mysql_client_plugin *)\&mysql_native_password_client_plugin$(COMMA) \
|
||||
$(ifneq $(filter WNT,$(OS)), \
|
||||
(struct st_mysql_client_plugin_AUTHENTICATION *)\&auth_gssapi_client_client_plugin$(COMMA) \
|
||||
) \
|
||||
$(if $(filter WNT,$(OS)), \
|
||||
(struct st_mysql_client_plugin *)\&pvio_shmem_client_plugin$(COMMA) \
|
||||
(struct st_mysql_client_plugin *)\&pvio_npipe_client_plugin$(COMMA) \
|
||||
|
||||
Reference in New Issue
Block a user