summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/session.c b/session.c
index 89e1ec89..7a70b82e 100644
--- a/session.c
+++ b/session.c
@@ -1439,6 +1439,13 @@ do_child(Session *s, const char *command)
#endif /* HAVE_OSF_SIA */
}
+#ifdef USE_PAM
+ if (options.use_pam && !is_pam_session_open()) {
+ display_loginmsg();
+ exit(254);
+ }
+#endif
+
/*
* Get the shell from the password data. An empty shell field is
* legal, and means /bin/sh.