summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2021-03-19 10:56:10 +1100
committerDaniel Black <daniel@mariadb.org>2021-03-20 17:06:55 +1100
commitb1cda4861a148abe78e37c450f5a99b778141f15 (patch)
treec1fdbf66ec766e5ab2de5d652c20b8ee6038f9d9
parent96dd4b53c16c458365d5cb6956db6ed96d55b4b6 (diff)
downloadmariadb-git-bb-10.2-danielblack-MDEV-25195-aix-auth-pam-check.tar.gz
MDEV-25195: pam check getgrouplist functionbb-10.2-danielblack-MDEV-25195-aix-auth-pam-check
AIX doesn't have getgrouplist so ensure function is checked. The HAVE_POSIX_GETGROUPLIST check was insufficient.
-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 dbb4701fbc4..1f58c7567b3 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
MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)
@@ -42,7 +43,7 @@ IF(HAVE_PAM_APPL_H)
INSTALL(FILES mapper/user_map.conf DESTINATION ${INSTALL_PAMDATADIR} COMPONENT Server)
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)