Skip to content
Browse files

ticket: 7104

subject: Fix spurious password expiry warning
version_fixed: 1.9.4
status: resolved

 ------------------------------------------------------------------------
 r25730 | ghudson | 2012-03-05 12:35:14 -0500 (Mon, 05 Mar 2012) | 15 lines

 ticket: 7098
 subject: Fix spurious password expiry warning
 target_version: 1.9.4
 tags: pullup

 r24241 (#6755) introduced a bug where if the KDC sends a LastReq entry
 containing an account expiry time, we send a prompter warning for
 password expiry even if there was no entry containing a password
 expiry time.  Typically, this results in the message "Warning: Your
 password will expire in less than one hour on Thu Jan  1 12:00:00
 1970".

 Fix this by explicitly checking for pw_exp == 0 in warn_pw_expiry()
 after we've gotten past the conditional for invoking the callback.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-9@25748 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information...
1 parent d1e9021 commit 768ae75e9871daf4345e519b6d4ae1ddf3e34e88 tlyu committed Mar 8, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/lib/krb5/krb/gic_pwd.c
View
4 src/lib/krb5/krb/gic_pwd.c
@@ -167,6 +167,10 @@ warn_pw_expiry(krb5_context context, krb5_get_init_creds_opt *options,
return;
}
+ /* Don't warn if no password expiry value was sent. */
+ if (pw_exp == 0)
+ return;
+
/* Don't warn if the password is being changed. */
if (in_tkt_service && strcmp(in_tkt_service, "kadmin/changepw") == 0)
return;

0 comments on commit 768ae75

Please sign in to comment.
Something went wrong with that request. Please try again.