diff -ru openssh-passexpire17/auth.c openssh-passexpire17-migrate/auth.c --- openssh-passexpire17/auth.c Sun Feb 2 23:18:59 2003 +++ openssh-passexpire17-migrate/auth.c Mon Mar 3 10:57:00 2003 @@ -282,7 +282,7 @@ (maxexpired*WEEK) <= time(NULL) ){ log("User %.100s password expired too long", pw->pw_name); - return 0; + aix_reset_password_change_time(pw); } } Only in openssh-passexpire17: auth.c.rej Only in openssh-passexpire17-migrate: auth.c~ diff -ru openssh-passexpire17/openbsd-compat/port-aix.c openssh-passexpire17-migrate/openbsd-compat/port-aix.c --- openssh-passexpire17/openbsd-compat/port-aix.c Wed Jan 15 09:14:22 2003 +++ openssh-passexpire17-migrate/openbsd-compat/port-aix.c Mon Mar 3 10:54:40 2003 @@ -29,6 +29,8 @@ #include #include <../xmalloc.h> +#include +#include /* * AIX has a "usrinfo" area where logname and other stuff is stored - @@ -71,6 +73,44 @@ /* Remove trailing newline */ *--p = '\0'; } + +/* + * Reset account's password change time + */ +int +aix_reset_password_change_time(struct passwd *pw) +{ + struct userpw *upw; + + debug("%s entering", __func__); + + if (setpwdb(S_READ|S_WRITE) == -1) { + debug("Couldn't open authentication database: %s", strerror(errno)); + return 0; + } + + if ((upw = getuserpw(pw->pw_name)) == NULL) { + debug("Couldn't get user details for %s: %s", + pw->pw_name, strerror(errno)); + enduserdb(); + return 0; + } + + upw->upw_flags |= PW_ADMCHG; /* set password change flag */ + if (putuserpw(upw) == -1) { + debug("Couldn't update user details for %s: %s", + pw->pw_name, strerror(errno)); + enduserdb(); + return 0; + } + if (enduserdb() == -1) { + debug("Error closing authentication database: %s", + strerror(errno)); + return 0; + } + return 1; +} + #endif /* WITH_AIXAUTHENTICATE */ #endif /* _AIX */ diff -ru openssh-passexpire17/openbsd-compat/port-aix.h openssh-passexpire17-migrate/openbsd-compat/port-aix.h --- openssh-passexpire17/openbsd-compat/port-aix.h Sat Feb 1 16:45:45 2003 +++ openssh-passexpire17-migrate/openbsd-compat/port-aix.h Mon Mar 3 10:54:40 2003 @@ -38,4 +38,5 @@ void aix_usrinfo(struct passwd *pw); void aix_remove_embedded_newlines(char *); +int aix_reset_password_change_time(struct passwd *pw); #endif /* _AIX */ Only in openssh-passexpire17-migrate/openbsd-compat: port-aix.h~