View | Details | Raw Unified | Return to bug 1087 | Differences between
and this patch

Collapse All | Expand All

(-)auth2.c (-7 / +11 lines)
Lines 222-234 userauth_finish(Authctxt *authctxt, int Link Here
222
222
223
#ifdef USE_PAM
223
#ifdef USE_PAM
224
	if (options.use_pam && authenticated) {
224
	if (options.use_pam && authenticated) {
225
		if (!PRIVSEP(do_pam_account())) {
225
		int success;
226
			/* if PAM returned a message, send it to the user */
226
227
			if (buffer_len(&loginmsg) > 0) {
227
		success = PRIVSEP(do_pam_account());
228
				buffer_append(&loginmsg, "\0", 1);
228
		/* if PAM returned a message, send it to the user */
229
				userauth_send_banner(buffer_ptr(&loginmsg));
229
		if (buffer_len(&loginmsg) > 0) {
230
				packet_write_wait();
230
			buffer_append(&loginmsg, "\0", 1);
231
			}
231
			userauth_send_banner(buffer_ptr(&loginmsg));
232
			packet_write_wait();
233
			buffer_clear(&loginmsg);
234
		}
235
		if (!success) {
232
			fatal("Access denied for user %s by PAM account "
236
			fatal("Access denied for user %s by PAM account "
233
			    "configuration", authctxt->user);
237
			    "configuration", authctxt->user);
234
		}
238
		}

Return to bug 1087