- AIX patch from Matt Richards <v2matt@btv.ibm.com> and David Rankin
   <drankin@bohemians.lexington.ky.us>
diff --git a/auth-passwd.c b/auth-passwd.c
index a8a52ce..278212a 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -11,13 +11,17 @@
 
 #ifndef USE_PAM
 
-RCSID("$Id: auth-passwd.c,v 1.15 2000/01/06 01:03:13 damien Exp $");
+RCSID("$Id: auth-passwd.c,v 1.16 2000/01/22 23:32:03 damien Exp $");
 
 #include "packet.h"
 #include "ssh.h"
 #include "servconf.h"
 #include "xmalloc.h"
 
+#ifdef WITH_AIXAUTHENTICATE
+#include <login.h>
+#endif
+
 #ifdef HAVE_SHADOW_H
 # include <shadow.h>
 #endif
@@ -39,6 +43,11 @@
 #ifdef HAVE_SHADOW_H
 	struct spwd *spw;
 #endif
+#ifdef WITH_AIXAUTHENTICATE
+	char *authmsg;
+	char *loginmsg;
+	int reenter = 1;
+#endif
 
 	/* deny if no user. */
 	if (pw == NULL)
@@ -56,6 +65,11 @@
 		/* Fall back to ordinary passwd authentication. */
 	}
 #endif
+
+#ifdef WITH_AIXAUTHENTICATE
+	return (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0);
+#endif
+
 #ifdef KRB4
 	if (options.kerberos_authentication == 1) {
 		int ret = auth_krb4_password(pw, password);