diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -35,6 +35,7 @@ RCSID("$OpenBSD: auth2.c,v 1.107 2004/07/28 09:40:29 markus Exp $"); | |||
35 | #include "dispatch.h" | 35 | #include "dispatch.h" |
36 | #include "pathnames.h" | 36 | #include "pathnames.h" |
37 | #include "monitor_wrap.h" | 37 | #include "monitor_wrap.h" |
38 | #include "buffer.h" | ||
38 | 39 | ||
39 | #ifdef GSSAPI | 40 | #ifdef GSSAPI |
40 | #include "ssh-gss.h" | 41 | #include "ssh-gss.h" |
@@ -44,6 +45,7 @@ RCSID("$OpenBSD: auth2.c,v 1.107 2004/07/28 09:40:29 markus Exp $"); | |||
44 | extern ServerOptions options; | 45 | extern ServerOptions options; |
45 | extern u_char *session_id2; | 46 | extern u_char *session_id2; |
46 | extern u_int session_id2_len; | 47 | extern u_int session_id2_len; |
48 | extern Buffer loginmsg; | ||
47 | 49 | ||
48 | /* methods */ | 50 | /* methods */ |
49 | 51 | ||
@@ -216,8 +218,17 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method) | |||
216 | authenticated = 0; | 218 | authenticated = 0; |
217 | 219 | ||
218 | #ifdef USE_PAM | 220 | #ifdef USE_PAM |
219 | if (options.use_pam && authenticated && !PRIVSEP(do_pam_account())) | 221 | if (options.use_pam && authenticated) { |
220 | authenticated = 0; | 222 | if (!PRIVSEP(do_pam_account())) { |
223 | authenticated = 0; | ||
224 | /* if PAM returned a message, send it to the user */ | ||
225 | if (buffer_len(&loginmsg) > 0) { | ||
226 | buffer_append(&loginmsg, "\0", 1); | ||
227 | userauth_send_banner(buffer_ptr(&loginmsg)); | ||
228 | buffer_clear(&loginmsg); | ||
229 | } | ||
230 | } | ||
231 | } | ||
221 | #endif | 232 | #endif |
222 | 233 | ||
223 | #ifdef _UNICOS | 234 | #ifdef _UNICOS |