summaryrefslogtreecommitdiffstats
path: root/src/windows/leash
diff options
context:
space:
mode:
authorKevin Wasserman <kevin.wasserman@painless-security.com>2012-07-30 16:30:34 -0400
committerBen Kaduk <kaduk@mit.edu>2012-08-29 14:50:20 -0400
commit95c89d4c738df9be8e60215e4a883794d4b7b15c (patch)
tree78104e72fb42a86642ff1a325efc3d9b8a2ef7de /src/windows/leash
parentcc904ef3ffc69827fc8aa2ed3b50d3c3cb00beef (diff)
downloadkrb5-95c89d4c738df9be8e60215e4a883794d4b7b15c.tar.gz
krb5-95c89d4c738df9be8e60215e4a883794d4b7b15c.tar.xz
krb5-95c89d4c738df9be8e60215e4a883794d4b7b15c.zip
Fix renew_until check for auto-renewal
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> ticket: 7326 (new) queue: kfw target_version: 1.10.4 tags: pullup
Diffstat (limited to 'src/windows/leash')
-rw-r--r--src/windows/leash/LeashView.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/windows/leash/LeashView.cpp b/src/windows/leash/LeashView.cpp
index c7cfdc3de1..eedc5a2064 100644
--- a/src/windows/leash/LeashView.cpp
+++ b/src/windows/leash/LeashView.cpp
@@ -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);