Don't let the "timeleft" returned by krb5_gss_acquire_cred be negative!
authorTheodore Tso <tytso@mit.edu>
Thu, 10 Oct 1996 17:51:42 +0000 (17:51 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 10 Oct 1996 17:51:42 +0000 (17:51 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9159 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/krb5/ChangeLog
src/lib/gssapi/krb5/acquire_cred.c

index b54d5eb7add5f087042c6b34dc9d0a2755018095..b7ccf600f1e53f1b8a0db7ded0554b33d65dc8ed 100644 (file)
@@ -1,3 +1,8 @@
+Thu Oct 10 13:50:49 1996  Theodore Y. Ts'o  <tytso@mit.edu>
+
+       * 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  <tytso@mit.edu>
 
        * gssapi_krb5.c: Definition of gss_nt_krb5_name was incorrect;
index cf88bbd6f1ecb76ef2a8445b6710d198dc657274..06acb887712e8ba1302823673f0d17cdc5d34494 100644 (file)
@@ -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 */