From 0a44d1ecf36455f7288a6f4349e676d922a46718 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 1 Jul 2004 09:48:29 +1000 Subject: [PATCH] - (dtucker) [session.c] Call display_loginmsg again after do_pam_session. Ensures messages from PAM modules are displayed when privsep=no. Note: I did not want to just move display_loginmsg since that would change existing behaviour (order of expiry warnings, "Last Login", motd) to less like the native tools. --- ChangeLog | 6 +++++- session.c | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9b90db35d..f47b68ea5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20040701 + - (dtucker) [session.c] Call display_loginmsg again after do_pam_session. + Ensures messages from PAM modules are displayed when privsep=no. + 20040630 - (dtucker) [auth-pam.c] Check for buggy PAM modules that return a NULL appdata_ptr to the conversation function. ok djm@ @@ -1465,4 +1469,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3463 2004/06/30 12:41:07 djm Exp $ +$Id: ChangeLog,v 1.3464 2004/06/30 23:48:29 dtucker Exp $ diff --git a/session.c b/session.c index cf2098931..a3a7ee784 100644 --- a/session.c +++ b/session.c @@ -1431,6 +1431,13 @@ do_child(Session *s, const char *command) #else /* HAVE_OSF_SIA */ do_nologin(pw); do_setusercontext(pw); + /* + * PAM session modules in do_setusercontext may have + * generated messages, so if this in an interactive + * login then display them too. + */ + if (command == NULL) + display_loginmsg(); #endif /* HAVE_OSF_SIA */ }