diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-12-05 23:27:57 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-12-07 10:30:33 +0100 |
commit | bf77679909c3d73aea77f3ededd8d84e3c045d44 (patch) | |
tree | b20fa714705c8a9da47775726d58eaa3bae7987c /daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c | |
parent | 8d892f442f27026ac7195f6d9720b6da046ff477 (diff) | |
download | freeipa.git-bf77679909c3d73aea77f3ededd8d84e3c045d44.tar.gz freeipa.git-bf77679909c3d73aea77f3ededd8d84e3c045d44.tar.xz freeipa.git-bf77679909c3d73aea77f3ededd8d84e3c045d44.zip |
Password change in a transaction, ensure passwords are truly expired
Wrap the password change extop in a transaction.
Fix the case where a password is reset and then immediately used. If done
fast enough then the KDC may not detect that the password is expired and
grant access using the expired password rather than prompting for a reset.
https://fedorahosted.org/freeipa/ticket/1064
Diffstat (limited to 'daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c index cac8bf45..bb1d96ad 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c @@ -640,6 +640,12 @@ int ipapwd_CheckPolicy(struct ipapwd_data *data) * force a password change on the next login. * But not if Directory Manager */ if (data->changetype == IPA_CHANGETYPE_ADMIN) { + /* The expiration date needs to be older than the current time + * otherwise the KDC may not immediately register the password + * as expired. The last password change needs to match the + * password expiration otherwise minlife issues will arise. + */ + data->timeNow -= 1; data->expireTime = data->timeNow; } |