-# endif
-# ifdef WITH_AIXAUTHENTICATE
- {
- char *authmsg = NULL;
- int reenter = 1;
- int authsuccess = 0;
-
- if (authenticate(pw->pw_name, password, &reenter,
- &authmsg) == 0 && ok) {
- char *msg;
- char *host =
- (char *)get_canonical_hostname(options.use_dns);
-
- authsuccess = 1;
- aix_remove_embedded_newlines(authmsg);
-
- debug3("AIX/authenticate succeeded for user %s: %.100s",
- pw->pw_name, authmsg);
-
- /* No pty yet, so just label the line as "ssh" */
- aix_setauthdb(authctxt->user);
- if (loginsuccess(authctxt->user, host, "ssh",
- &msg) == 0) {
- if (msg != NULL) {
- debug("%s: msg %s", __func__, msg);
- buffer_append(&loginmsg, msg,
- strlen(msg));
- xfree(msg);
- }
- }
- } else {
- debug3("AIX/authenticate failed for user %s: %.100s",
- pw->pw_name, authmsg);
+#endif
+#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
+ if (!expire_checked) {
+ expire_checked = 1;
+ if (auth_shadow_pwexpired(authctxt)) {
+ disable_forwarding();
+ authctxt->force_pwchange = 1;