summaryrefslogtreecommitdiff
path: root/plugin/auth_pam
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2020-10-23 17:21:10 +0700
committerDmitry Shulga <dmitry.shulga@mariadb.com>2020-10-23 17:22:35 +0700
commit5e7cde41e028eee19d7844c320415057afabaaac (patch)
tree41dda4a120d891962548f647c4f24307eb117fff /plugin/auth_pam
parent6dc14453c5b72920575116ec3c836c1647f05873 (diff)
downloadmariadb-git-5e7cde41e028eee19d7844c320415057afabaaac.tar.gz
MDEV-23926: Follow-up patch to cleanup plugin/auth_pam/CMakeLists.txt code
This patch moves definitions of macros variables HAVE_PAM_SYSLOG, HAVE_PAM_EXT_H, HAVE_PAM_APPL_H, HAVE_STRNDUP from command line (in the form -Dmacros) to the auto-generated header file config_auth_pam.h
Diffstat (limited to 'plugin/auth_pam')
-rw-r--r--plugin/auth_pam/CMakeLists.txt12
-rw-r--r--plugin/auth_pam/auth_pam.c1
2 files changed, 1 insertions, 12 deletions
diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt
index fce9b8cf8a6..d3b3c256527 100644
--- a/plugin/auth_pam/CMakeLists.txt
+++ b/plugin/auth_pam/CMakeLists.txt
@@ -33,19 +33,7 @@ SET(CMAKE_REQUIRED_LIBRARIES pam)
CHECK_FUNCTION_EXISTS(pam_syslog HAVE_PAM_SYSLOG)
SET(CMAKE_REQUIRED_LIBRARIES)
-IF(HAVE_PAM_SYSLOG)
- ADD_DEFINITIONS(-DHAVE_PAM_SYSLOG)
-ENDIF()
-
-IF(HAVE_PAM_EXT_H)
- ADD_DEFINITIONS(-DHAVE_PAM_EXT_H)
-ENDIF()
-
IF(HAVE_PAM_APPL_H)
- ADD_DEFINITIONS(-DHAVE_PAM_APPL_H)
- IF(HAVE_STRNDUP)
- ADD_DEFINITIONS(-DHAVE_STRNDUP)
- ENDIF(HAVE_STRNDUP)
FIND_LIBRARY(PAM_LIBRARY pam) # for srpm build-depends detection
MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)
diff --git a/plugin/auth_pam/auth_pam.c b/plugin/auth_pam/auth_pam.c
index fae73aea690..c80ec51b48d 100644
--- a/plugin/auth_pam/auth_pam.c
+++ b/plugin/auth_pam/auth_pam.c
@@ -16,6 +16,7 @@
#define _GNU_SOURCE 1 /* for strndup */
+#include <config_auth_pam.h>
#include <mysql/plugin_auth.h>
#include <stdio.h>
#include <string.h>