From 3cbdd45065a9381de6c2cacea7c148b968bf72e3 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 14 Apr 2001 03:27:43 +0000 Subject: [PATCH] * g_tkt_svc.c (CredIsExpired): Don't use a variable named "time" git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13179 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/ChangeLog | 4 ++++ src/lib/krb4/g_tkt_svc.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index b9927351e..d91b33d52 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,7 @@ +2001-04-13 Ken Raeburn + + * g_tkt_svc.c (CredIsExpired): Don't use a variable named "time". + 2001-04-13 Danilo Almeida * memcache.h: Don't use macro PROTOTYPE. diff --git a/src/lib/krb4/g_tkt_svc.c b/src/lib/krb4/g_tkt_svc.c index 4bb43f8f0..cbe74a2f2 100644 --- a/src/lib/krb4/g_tkt_svc.c +++ b/src/lib/krb4/g_tkt_svc.c @@ -71,17 +71,17 @@ static int CredIsExpired( cr ) CREDENTIALS *cr; { - KRB4_32 time; + KRB4_32 now; - /* This routine is for use with clients only in order to determine if a credential - is still good - Note: twice CLOCK_SKEW was added to age of ticket so that we could - be more sure that the ticket was good. - FIXME: I think this is a bug -- should use the same algorithm - everywhere to determine ticket expiration. */ + /* This routine is for use with clients only in order to determine + if a credential is still good. + Note: twice CLOCK_SKEW was added to age of ticket so that we could + be more sure that the ticket was good. + FIXME: I think this is a bug -- should use the same algorithm + everywhere to determine ticket expiration. */ - time = TIME_GMT_UNIXSEC; - return time + 2 * CLOCK_SKEW > krb_life_to_time(cr->issue_date, + now = TIME_GMT_UNIXSEC; + return now + 2 * CLOCK_SKEW > krb_life_to_time(cr->issue_date, cr->lifetime); } -- 2.26.2