diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |