summaryrefslogtreecommitdiff
path: root/auth2.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/auth2.c b/auth2.c
index 57e6db46b..60e261f7f 100644
--- a/auth2.c
+++ b/auth2.c
@@ -220,13 +220,14 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
220#ifdef USE_PAM 220#ifdef USE_PAM
221 if (options.use_pam && authenticated) { 221 if (options.use_pam && authenticated) {
222 if (!PRIVSEP(do_pam_account())) { 222 if (!PRIVSEP(do_pam_account())) {
223 authenticated = 0;
224 /* if PAM returned a message, send it to the user */ 223 /* if PAM returned a message, send it to the user */
225 if (buffer_len(&loginmsg) > 0) { 224 if (buffer_len(&loginmsg) > 0) {
226 buffer_append(&loginmsg, "\0", 1); 225 buffer_append(&loginmsg, "\0", 1);
227 userauth_send_banner(buffer_ptr(&loginmsg)); 226 userauth_send_banner(buffer_ptr(&loginmsg));
228 buffer_clear(&loginmsg); 227 packet_write_wait();
229 } 228 }
229 fatal("Access denied for user %s by PAM account "
230 "configuration", authctxt->user);
230 } 231 }
231 } 232 }
232#endif 233#endif