Add check for pam_getenvlist()
This commit is contained in:
@@ -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
16
configure
vendored
@@ -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
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user