View | Details | Raw Unified | Return to bug 2049
Collapse All | Expand All

(-)auth2.c (-7 / +9 lines)
Lines 314-329 userauth_finish(Authctxt *authctxt, int Link Here
314
314
315
#ifdef USE_PAM
315
#ifdef USE_PAM
316
	if (options.use_pam && authenticated) {
316
	if (options.use_pam && authenticated) {
317
		if (!PRIVSEP(do_pam_account())) {
317
		int success = PRIVSEP(do_pam_account());
318
319
		if (buffer_len(&loginmsg) > 0) {
318
			/* if PAM returned a message, send it to the user */
320
			/* if PAM returned a message, send it to the user */
319
			if (buffer_len(&loginmsg) > 0) {
321
			buffer_append(&loginmsg, "\0", 1);
320
				buffer_append(&loginmsg, "\0", 1);
322
			userauth_send_banner(buffer_ptr(&loginmsg));
321
				userauth_send_banner(buffer_ptr(&loginmsg));
323
			packet_write_wait();
322
				packet_write_wait();
324
			buffer_clear(&loginmsg);
323
			}
325
		}
326
		if (!success)
324
			fatal("Access denied for user %s by PAM account "
327
			fatal("Access denied for user %s by PAM account "
325
			    "configuration", authctxt->user);
328
			    "configuration", authctxt->user);
326
		}
327
	}
329
	}
328
#endif
330
#endif
329
331

Return to bug 2049