- (djm) Bug #564: Perform PAM account checks for all authentications when
   UsePAM=yes; ok dtucker
diff --git a/auth1.c b/auth1.c
index 7c01001..d8b5836 100644
--- a/auth1.c
+++ b/auth1.c
@@ -290,6 +290,12 @@
 			authenticated = 0;
 #endif
 
+#ifdef USE_PAM
+		if (options.use_pam && authenticated && 
+		    !PRIVSEP(do_pam_account()))
+			authenticated = 0;
+#endif
+
 		/* Log before sending the reply */
 		auth_log(authctxt, authenticated, get_authname(type), info);