-#endif
-#ifdef WITH_AIXAUTHENTICATE
- return (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0);
-#endif
-#ifdef KRB4
+# endif
+# ifdef WITH_AIXAUTHENTICATE
+ authsuccess = (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0);
+
+ if (authsuccess)
+ /* We don't have a pty yet, so just label the line as "ssh" */
+ if (loginsuccess(authctxt->user,
+ get_canonical_hostname(options.verify_reverse_mapping),
+ "ssh", &aixloginmsg) < 0)
+ aixloginmsg = NULL;
+
+ return(authsuccess);
+# endif
+# ifdef KRB4