From 4e99720563ae850c5d5a1c86e45ac51173fbef9c Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 9 Jul 2000 21:21:52 +1000 Subject: - (djm) Only enable PAM_TTY kludge for Linux. Problem report from Kevin Steves --- ChangeLog | 4 ++++ acconfig.h | 3 +++ auth-pam.c | 4 +++- configure.in | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b2bef47c9..a37d7b4ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20000709 + - (djm) Only enable PAM_TTY kludge for Linux. Problem report from + Kevin Steves + 20000708 - (djm) Fix bad fprintf format handling in auth-pam.c. Patch from Aaron Hopkins diff --git a/acconfig.h b/acconfig.h index af990565c..e11bf5e60 100644 --- a/acconfig.h +++ b/acconfig.h @@ -6,6 +6,9 @@ @TOP@ +/* Work around problematic Linux PAM modules handling of PAM_TTY */ +#undef PAM_TTY_KLUDGE + /* Use PIPES instead of a socketpair() */ #undef USE_PIPES diff --git a/auth-pam.c b/auth-pam.c index 27e59ef98..a3067d619 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -34,7 +34,7 @@ #include "xmalloc.h" #include "servconf.h" -RCSID("$Id: auth-pam.c,v 1.9 2000/07/08 00:14:08 djm Exp $"); +RCSID("$Id: auth-pam.c,v 1.10 2000/07/09 11:21:52 djm Exp $"); #define NEW_AUTHTOK_MSG \ "Warning: You password has expired, please change it now" @@ -246,6 +246,7 @@ void start_pam(struct passwd *pw) PAM_STRERROR((pam_handle_t *)pamh, pam_retval)); } +#ifdef PAM_TTY_KLUDGE /* * Some PAM modules (e.g. pam_time) require a TTY to operate, * and will fail in various stupid ways if they don't get one. @@ -258,6 +259,7 @@ void start_pam(struct passwd *pw) fatal("PAM set tty failed: %.200s", PAM_STRERROR((pam_handle_t *)pamh, pam_retval)); } +#endif /* PAM_TTY_KLUDGE */ fatal_add_cleanup(&pam_cleanup_proc, NULL); } diff --git a/configure.in b/configure.in index ace6de4b4..4d0f6ea43 100644 --- a/configure.in +++ b/configure.in @@ -99,6 +99,7 @@ case "$host" in *-*-linux*) no_dev_ptmx=1 AC_DEFINE(DONT_TRY_OTHER_AF) + AC_DEFINE(PAM_TTY_KLUDGE) inet6_default_4in6=yes ;; *-*-netbsd*) -- cgit v1.2.3