- (djm) Bug #564: Perform PAM account checks for all authentications when
   UsePAM=yes; ok dtucker
diff --git a/auth2.c b/auth2.c
index 639bf91..e6ec8dd 100644
--- a/auth2.c
+++ b/auth2.c
@@ -213,6 +213,11 @@
 	    !auth_root_allowed(method))
 		authenticated = 0;
 
+#ifdef USE_PAM
+	if (options.use_pam && authenticated && !PRIVSEP(do_pam_account()))
+		authenticated = 0;
+#endif
+
 #ifdef _UNICOS
 	if (authenticated && cray_access_denied(authctxt->user)) {
 		authenticated = 0;