]> granicus.if.org Git - sudo/commitdiff
Add check for pam_getenvlist()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 30 Mar 2012 16:32:47 +0000 (12:32 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 30 Mar 2012 16:32:47 +0000 (12:32 -0400)
--HG--
branch : 1.7

config.h.in
configure
configure.in

index cce0a7cba3dbc54922e46af24cb5f06400b9aebf..7abf45feb191e44949ff4fc779718d240b85969b 100644 (file)
 /* 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
 
index e4cdc97f93199fb1317379a9c1812ce55ac059d3..8eabbcd497439c2dd2495a9c4dafcb83b1b3e2f5 100755 (executable)
--- 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
 
index 3e9243e6ba6a479e9dc9136e9d6a02d1991ee237..2d94a854ce0874ec6e8752034bd96822f77d1c7d 100644 (file)
@@ -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