Add check for pam_getenvlist()

This commit is contained in:
Todd C. Miller
2012-03-14 20:55:11 -04:00
parent 83459e13b5
commit 9cd65dafc6
3 changed files with 25 additions and 0 deletions

View File

@@ -375,6 +375,9 @@
/* Define to 1 if you use PAM authentication. */
#undef HAVE_PAM
/* Define to 1 if you have the `pam_getenvlist' function. */
#undef HAVE_PAM_GETENVLIST
/* Define to 1 if you use a specific PAM session for sudo -i. */
#undef HAVE_PAM_LOGIN

16
configure vendored
View File

@@ -18228,6 +18228,22 @@ done
fi
if test "$with_pam" = "yes"; then
# Older PAM implementations lack pam_getenvlist
OLIBS="$LIBS"
LIBS="$LIBS -lpam $lt_cv_dlopen_libs"
for ac_func in pam_getenvlist
do :
ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_PAM_GETENVLIST 1
_ACEOF
fi
done
LIBS="$OLIBS"
# We already link with -ldl if needed (see LIBDL below)
SUDOERS_LIBS="${SUDOERS_LIBS} -lpam"
$as_echo "#define HAVE_PAM 1" >>confdefs.h

View File

@@ -2569,6 +2569,12 @@ if test ${with_pam-"no"} != "no"; then
fi
if test "$with_pam" = "yes"; then
# Older PAM implementations lack pam_getenvlist
OLIBS="$LIBS"
LIBS="$LIBS -lpam $lt_cv_dlopen_libs"
AC_CHECK_FUNCS(pam_getenvlist)
LIBS="$OLIBS"
# We already link with -ldl if needed (see LIBDL below)
SUDOERS_LIBS="${SUDOERS_LIBS} -lpam"
AC_DEFINE(HAVE_PAM)