Do not report creds as expired if the expiration time is indefinite
authorPaul Park <pjpark@mit.edu>
Mon, 22 May 1995 15:22:56 +0000 (15:22 +0000)
committerPaul Park <pjpark@mit.edu>
Mon, 22 May 1995 15:22:56 +0000 (15:22 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5841 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/krb5/inq_cred.c

index d040018ae2284f4ac120b3c3df546689c904d0bf..3d6dd2e78b92fc57f36551b7c0fead1aa1310c65 100644 (file)
@@ -66,8 +66,12 @@ krb5_gss_inquire_cred(context, minor_status, cred_handle, name, lifetime_ret,
       return(GSS_S_FAILURE);
    }
 
-   if ((lifetime = cred->tgt_expire - now) < 0)
-      lifetime = 0;
+   if (cred->tgt_expire > 0) {
+       if ((lifetime = cred->tgt_expire - now) < 0)
+          lifetime = 0;
+   }
+   else
+       lifetime = GSS_C_INDEFINITE;
 
    if (name) {
       if (code = krb5_copy_principal(context, cred->princ, &ret_name)) {