summaryrefslogtreecommitdiff
path: root/plugin/auth_pam
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-03-27 17:12:28 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-03-27 17:12:28 +0200
commit7ae37ff74fc18c391bd0d3fd1fbf6afafe966435 (patch)
tree792d8852dd9aaa06b5ddfb374f02774b18ed150c /plugin/auth_pam
parentd1ff2c583f452d8e1899f800609c329c998f0a33 (diff)
parent3157fa182accab86a4dea45edbcbca4eb5157723 (diff)
downloadmariadb-git-7ae37ff74fc18c391bd0d3fd1fbf6afafe966435.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'plugin/auth_pam')
-rw-r--r--plugin/auth_pam/CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt
index f7d8e019751..8d11d174f90 100644
--- a/plugin/auth_pam/CMakeLists.txt
+++ b/plugin/auth_pam/CMakeLists.txt
@@ -4,10 +4,11 @@ INCLUDE (CheckFunctionExists)
CHECK_INCLUDE_FILES (security/pam_ext.h HAVE_PAM_EXT_H)
CHECK_INCLUDE_FILES (security/pam_appl.h HAVE_PAM_APPL_H)
CHECK_FUNCTION_EXISTS (strndup HAVE_STRNDUP)
+CHECK_FUNCTION_EXISTS (getgrouplist HAVE_GETGROUPLIST)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-# Check whether getgrouplist uses git_t for second and third arguments.
+# Check whether getgrouplist uses gtid_t for second and third arguments.
SET(CMAKE_REQUIRED_FLAGS -Werror)
CHECK_C_SOURCE_COMPILES(
"
@@ -29,7 +30,7 @@ SET(CMAKE_REQUIRED_LIBRARIES pam)
CHECK_FUNCTION_EXISTS(pam_syslog HAVE_PAM_SYSLOG)
SET(CMAKE_REQUIRED_LIBRARIES)
-IF(HAVE_PAM_APPL_H)
+IF(HAVE_PAM_APPL_H AND HAVE_GETGROUPLIST)
FIND_LIBRARY(PAM_LIBRARY pam) # for srpm build-depends detection
ADD_DEFINITIONS(-D_GNU_SOURCE)
MYSQL_ADD_PLUGIN(auth_pam_v1 auth_pam_v1.c LINK_LIBRARIES pam MODULE_ONLY)
@@ -54,7 +55,7 @@ IF(HAVE_PAM_APPL_H)
SET(CPACK_RPM_server_USER_FILELIST ${CPACK_RPM_server_USER_FILELIST} "%config(noreplace) ${INSTALL_PAMDATADIR}/*" PARENT_SCOPE)
ENDIF()
ENDIF()
-ENDIF(HAVE_PAM_APPL_H)
+ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config_auth_pam.h)