From c3aa3dd70c73312423797909af8d5fcad10db235 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 28 Oct 2001 22:34:52 +1100 Subject: - (djm) Disconnect if no tty and PAM reports password expired --- session.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'session.c') diff --git a/session.c b/session.c index e9d8ceb73..10cefdb44 100644 --- a/session.c +++ b/session.c @@ -432,6 +432,9 @@ do_exec_no_pty(Session *s, const char *command) #if defined(USE_PAM) do_pam_session(s->pw->pw_name, NULL); do_pam_setcred(1); + if (is_pam_password_change_required()) + packet_disconnect("Password change required but no " + "TTY available"); #endif /* USE_PAM */ /* Fork the child. */ -- cgit v1.2.3