]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix renew_until check for auto-renewal
authorKevin Wasserman <kevin.wasserman@painless-security.com>
Mon, 30 Jul 2012 20:30:34 +0000 (16:30 -0400)
committerTom Yu <tlyu@mit.edu>
Wed, 29 Aug 2012 20:28:22 +0000 (16:28 -0400)
This was completely wrong, but only caused a severe problem on 64 bit
builds. On 32 bit builds the result was effectively always 'success',
so it would always attempt to renew even if there was not sufficient time
left in the renewable lifetime. This did not have much observable
adverse effect. But on 64 bit builds it always failed and so never
attempted renewal.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
(cherry picked from commit 95c89d4c738df9be8e60215e4a883794d4b7b15c)

ticket: 7326
status: resolved

src/windows/leash/LeashView.cpp

index c7cfdc3de1916f909e5ba016398365d7c9b5dbc0..eedc5a20648668949dbb13f99ba0f24f22f3401f 100644 (file)
@@ -2558,7 +2558,7 @@ BOOL CLeashView::PreTranslateMessage(MSG* pMsg)
 #ifndef NO_KRB5
             if ( m_ticketStatusKrb5 == TWENTY_MINUTES_LEFT &&
                  m_autoRenewTickets && !m_autoRenewalAttempted && ticketinfo.Krb5.renew_until &&
-                 (ticketinfo.Krb5.issued + ticketinfo.Krb5.renew_until - LeashTime() > 20 * 60))
+                 (ticketinfo.Krb5.renew_until - LeashTime() > 20 * 60))
             {
                 m_autoRenewalAttempted = 1;
                 ReleaseMutex(ticketinfo.lockObj);