From 4d1de3a3cdc917a4240386f42e075dfdb4d9a1c4 Mon Sep 17 00:00:00 2001 From: djm Date: Mon, 17 Nov 2003 23:45:20 +0000 Subject: [PATCH] - (djm) Fix early exit for root auth success when UsePAM=yes and PermitRootLogin=no --- ChangeLog | 4 ++++ monitor.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aa5dc838..3282e943 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20031117 + - (djm) Fix early exit for root auth success when UsePAM=yes and + PermitRootLogin=no + 20031117 - (djm) OpenBSD CVS Sync - djm@cvs.openbsd.org 2003/11/03 09:03:37 diff --git a/monitor.c b/monitor.c index 97f1ee9f..c4f9a48f 100644 --- a/monitor.c +++ b/monitor.c @@ -309,7 +309,7 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor) authenticated = 0; #ifdef USE_PAM /* PAM needs to perform account checks after auth */ - if (options.use_pam) { + if (options.use_pam && authenticated) { Buffer m; buffer_init(&m); -- 2.45.1