From 37be3e84cff480b40426f2093c9447c0131168e0 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 10 Oct 1996 17:51:42 +0000 Subject: [PATCH] Don't let the "timeleft" returned by krb5_gss_acquire_cred be negative! git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9159 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 5 +++++ src/lib/gssapi/krb5/acquire_cred.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index b54d5eb7a..b7ccf600f 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 10 13:50:49 1996 Theodore Y. Ts'o + + * acquire_cred.c (krb5_gss_acquire_cred): Don't let the "timeleft" + returned by krb5_gss_acquire_cred be negative! + Wed Oct 9 18:02:43 1996 Theodore Y. Ts'o * gssapi_krb5.c: Definition of gss_nt_krb5_name was incorrect; diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c index cf88bbd6f..06acb8877 100644 --- a/src/lib/gssapi/krb5/acquire_cred.c +++ b/src/lib/gssapi/krb5/acquire_cred.c @@ -421,7 +421,7 @@ krb5_gss_acquire_cred(minor_status, desired_name, time_req, } if (time_rec) - *time_rec = cred->tgt_expire - now; + *time_rec = (cred->tgt_expire > now) ? (cred->tgt_expire - now) : 0; } /* create mechs */ -- 2.26.2