From 3d5ab890d3377eb1c344e69992252bebec8a29e6 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 16 Jun 2017 18:31:52 +0200 Subject: Fix pam_info() and pam_error() replacement On FreeBSD these are functions while on Linux they are macros causing them to be incorrectly replaced on FreeBSD. This resulted in a crash of the PAM module when e.g. presenting messages about password expiry. --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 34d42d1..564f9c8 100644 --- a/configure.ac +++ b/configure.ac @@ -606,6 +606,21 @@ then # replace some PAM functions if they are unavailable AC_REPLACE_FUNCS(pam_get_authtok pam_prompt) AC_CHECK_FUNCS(pam_modutil_getpwnam pam_syslog) + AC_CHECK_DECLS([pam_info, pam_error],,, [ + #ifdef HAVE_SECURITY_PAM_APPL_H + #include + #endif + #ifndef HAVE_PAM_PAM_MODULES_H + #include + #ifdef HAVE_SECURITY_PAM_EXT_H + #include + #endif + #else + #include + #endif + #ifdef HAVE_SECURITY_PAM_MODUTIL_H + #include + #endif]) # find out how to link the library pam_ldap_so_LINK="\$(CCLD) \$(AM_CFLAGS) \$(CFLAGS) \$(pam_ldap_so_LDFLAGS) \$(LDFLAGS) -o \$@" -- cgit v1.2.3