Skip to content

Commit d3581e9

Browse files
PS-8330 merge: Merge MySQL 8.0.30 - Q3 2022 (macos ldap_simple / ldap_sals fix) (percona#4915)
https://jira.percona.com/browse/PS-8330 Intrroduced new 'WITH_PERCONA_AUTHENTICATION_LDAP' top-level CMake option that controlls if Percona's 'authentication_ldap_simple' and 'authentication_ldap_sasl' are included in the build. Fixed 'authentication_ldap_simple' / 'authentication_ldap_sasl' plugin dependencies: instead ofthe hardcoded 'ldap_r' we now use '${LDAP_LIBRARY} ${LBER_LIBRARY}' detected in the 'ldap.cmake'. Azure Pipelines configuration file updated so that 'authentication_ldap_simple' / 'authentication_ldap_sasl' are not built on MacOS.
1 parent c4b0467 commit d3581e9

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,6 +1830,9 @@ MYSQL_CHECK_SASL_DLLS()
18301830
MYSQL_CHECK_LDAP()
18311831
MYSQL_CHECK_LDAP_DLLS()
18321832

1833+
# Percona LDAP Simple / LDAP SASL authentication plugins
1834+
OPTION(WITH_PERCONA_AUTHENTICATION_LDAP "Build with Percona LDAP Simple / LDAP SASL authentication plugins" ON)
1835+
18331836
# Add Windows specific jemalloc DLL
18341837
IF(WIN32)
18351838
MYSQL_CHECK_WIN_JEMALLOC()

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ jobs:
378378
-DWITH_SSL=/usr/local/opt/[email protected]
379379
-DWITH_FIDO=bundled
380380
-DWITH_ZLIB=bundled
381+
-DWITH_PERCONA_AUTHENTICATION_LDAP=OFF
381382
"
382383
else
383384
CMAKE_OPT+="

plugin/auth_ldap/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1515

16-
IF(WITH_LDAP)
16+
IF(WITH_PERCONA_AUTHENTICATION_LDAP)
1717
INCLUDE (CheckLibraryExists)
1818
CHECK_LIBRARY_EXISTS(ldap ldap_initialize "" HAVE_LDAP)
1919

@@ -43,11 +43,11 @@ SET(ALP_SOURCES_SASL
4343
INCLUDE_DIRECTORIES(SYSTEM ${BOOST_PATCHES_DIR} ${BOOST_INCLUDE_DIR})
4444

4545
MYSQL_ADD_PLUGIN(authentication_ldap_simple ${ALP_SOURCES_SIMPLE}
46-
LINK_LIBRARIES ldap_r MODULE_ONLY MODULE_OUTPUT_NAME "authentication_ldap_simple")
46+
LINK_LIBRARIES "${LDAP_LIBRARY}" "${LBER_LIBRARY}" MODULE_ONLY MODULE_OUTPUT_NAME "authentication_ldap_simple")
4747
TARGET_COMPILE_DEFINITIONS(authentication_ldap_simple PRIVATE -DPLUGIN_SIMPLE)
4848

4949
MYSQL_ADD_PLUGIN(authentication_ldap_sasl ${ALP_SOURCES_SASL}
50-
LINK_LIBRARIES ldap_r MODULE_ONLY MODULE_OUTPUT_NAME "authentication_ldap_sasl")
50+
LINK_LIBRARIES "${LDAP_LIBRARY}" "${LBER_LIBRARY}" MODULE_ONLY MODULE_OUTPUT_NAME "authentication_ldap_sasl")
5151
TARGET_COMPILE_DEFINITIONS(authentication_ldap_sasl PRIVATE -DPLUGIN_SASL)
5252

5353
IF(UNIX)
@@ -56,4 +56,4 @@ SET(ALP_SOURCES_SASL
5656
ENDIF(INSTALL_MYSQLTESTDIR)
5757
ENDIF(UNIX)
5858

59-
ENDIF(WITH_LDAP)
59+
ENDIF(WITH_PERCONA_AUTHENTICATION_LDAP)

0 commit comments

Comments
 (0)