From: Todd C. Miller Date: Fri, 30 Mar 2012 16:32:47 +0000 (-0400) Subject: Add check for pam_getenvlist() X-Git-Tag: SUDO_1_7_9p1~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=520db6e461e5218c8532e696d5654f3f0e49e701;p=sudo Add check for pam_getenvlist() --HG-- branch : 1.7 --- diff --git a/config.h.in b/config.h.in index cce0a7cba..7abf45feb 100644 --- a/config.h.in +++ b/config.h.in @@ -377,6 +377,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 diff --git a/configure b/configure index e4cdc97f9..8eabbcd49 100755 --- a/configure +++ b/configure @@ -17539,6 +17539,21 @@ 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" SUDO_LIBS="${SUDO_LIBS} -lpam $lt_cv_dlopen_libs" $as_echo "#define HAVE_PAM 1" >>confdefs.h diff --git a/configure.in b/configure.in index 3e9243e6b..2d94a854c 100644 --- a/configure.in +++ b/configure.in @@ -2298,6 +2298,11 @@ 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" dnl dnl Some platforms need libdl for dlopen dnl