Lines 339-351
if test "$with_libpam" != "no"; then
Link Here
|
339 |
AC_MSG_ERROR(libpam not found) |
339 |
AC_MSG_ERROR(libpam not found) |
340 |
fi |
340 |
fi |
341 |
|
341 |
|
342 |
AC_CHECK_LIB(pam_misc, main, |
342 |
LIBPAM="-lpam" |
343 |
[pam_misc_lib="yes"], [pam_misc_lib="no"]) |
343 |
pam_conv_function="no" |
344 |
if test "$pam_misc_lib$with_libpam" = "noyes" ; then |
344 |
|
345 |
AC_MSG_ERROR(libpam_misc not found) |
345 |
AC_CHECK_LIB(pam, openpam_ttyconv, |
|
|
346 |
[pam_conv_function="openpam_ttyconv"], |
347 |
AC_CHECK_LIB(pam_misc, misc_conv, |
348 |
[pam_conv_function="misc_conv"; LIBPAM="$LIBPAM -lpam_misc"]) |
349 |
) |
350 |
|
351 |
if test "$pam_conv_function$with_libpam" = "noyes" ; then |
352 |
AC_MSG_ERROR(PAM conversation function not found) |
346 |
fi |
353 |
fi |
347 |
|
354 |
|
348 |
if test "$pam_lib$pam_misc_lib" = "yesyes" ; then |
355 |
pam_headers_found=no |
|
|
356 |
AC_CHECK_HEADERS( [security/openpam.h security/pam_misc.h], |
357 |
[ pam_headers_found=yes ; break ], [], |
358 |
[ #include <security/pam_appl.h> ] ) |
359 |
if test "$pam_headers_found$with_libpam" = "noyes" ; then |
360 |
AC_MSG_ERROR(PAM headers not found) |
361 |
fi |
362 |
|
363 |
|
364 |
if test "$pam_lib$pam_headers_found" = "yesyes" -a "$pam_conv_function" != "no" ; then |
349 |
with_libpam="yes" |
365 |
with_libpam="yes" |
350 |
else |
366 |
else |
351 |
with_libpam="no" |
367 |
with_libpam="no" |
Lines 353-361
if test "$with_libpam" != "no"; then
Link Here
|
353 |
fi |
369 |
fi |
354 |
dnl Now with_libpam is either yes or no |
370 |
dnl Now with_libpam is either yes or no |
355 |
if test "$with_libpam" = "yes"; then |
371 |
if test "$with_libpam" = "yes"; then |
|
|
372 |
AC_CHECK_DECLS([PAM_ESTABLISH_CRED, |
373 |
PAM_DELETE_CRED, |
374 |
PAM_NEW_AUTHTOK_REQD, |
375 |
PAM_DATA_SILENT], |
376 |
[], [], [#include <security/pam_appl.h>]) |
377 |
|
378 |
|
379 |
save_libs=$LIBS |
380 |
LIBS="$LIBS $LIBPAM" |
381 |
AC_CHECK_FUNCS([pam_fail_delay]) |
382 |
LIBS=$save_libs |
383 |
|
356 |
AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules]) |
384 |
AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules]) |
|
|
385 |
AC_DEFINE_UNQUOTED(SHADOW_PAM_CONVERSATION, [$pam_conv_function],[PAM converstation to use]) |
357 |
AM_CONDITIONAL(USE_PAM, [true]) |
386 |
AM_CONDITIONAL(USE_PAM, [true]) |
358 |
LIBPAM="-lpam -lpam_misc" |
387 |
|
359 |
AC_MSG_CHECKING(use login and su access checking if PAM not used) |
388 |
AC_MSG_CHECKING(use login and su access checking if PAM not used) |
360 |
AC_MSG_RESULT(no) |
389 |
AC_MSG_RESULT(no) |
361 |
else |
390 |
else |