diff options
author | Damien Miller <djm@mindrot.org> | 2001-10-28 22:34:52 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-10-28 22:34:52 +1100 |
commit | c3aa3dd70c73312423797909af8d5fcad10db235 (patch) | |
tree | 6fca7304df2ef680ad9bc4eac07a9944bcec247d /session.c | |
parent | 33cdd9ee7b9261cd3cc8e35fd21f3676eeb12cbe (diff) |
- (djm) Disconnect if no tty and PAM reports password expired
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -432,6 +432,9 @@ do_exec_no_pty(Session *s, const char *command) | |||
432 | #if defined(USE_PAM) | 432 | #if defined(USE_PAM) |
433 | do_pam_session(s->pw->pw_name, NULL); | 433 | do_pam_session(s->pw->pw_name, NULL); |
434 | do_pam_setcred(1); | 434 | do_pam_setcred(1); |
435 | if (is_pam_password_change_required()) | ||
436 | packet_disconnect("Password change required but no " | ||
437 | "TTY available"); | ||
435 | #endif /* USE_PAM */ | 438 | #endif /* USE_PAM */ |
436 | 439 | ||
437 | /* Fork the child. */ | 440 | /* Fork the child. */ |