summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/session.c b/session.c
index b32c9e2ca..8ac476c69 100644
--- a/session.c
+++ b/session.c
@@ -1477,7 +1477,8 @@ do_child(Session *s, const char *command)
1477 } 1477 }
1478 1478
1479#ifdef USE_PAM 1479#ifdef USE_PAM
1480 if (options.use_pam && !is_pam_session_open()) { 1480 if (options.use_pam && !options.use_login && !is_pam_session_open()) {
1481 debug3("PAM session not opened, exiting");
1481 display_loginmsg(); 1482 display_loginmsg();
1482 exit(254); 1483 exit(254);
1483 } 1484 }