From 13fb2c183ce385e723562a0b346d93bd145e191e Mon Sep 17 00:00:00 2001 From: Paul Park Date: Mon, 22 May 1995 15:22:56 +0000 Subject: [PATCH] Do not report creds as expired if the expiration time is indefinite git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5841 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/inq_cred.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/gssapi/krb5/inq_cred.c b/src/lib/gssapi/krb5/inq_cred.c index d040018ae..3d6dd2e78 100644 --- a/src/lib/gssapi/krb5/inq_cred.c +++ b/src/lib/gssapi/krb5/inq_cred.c @@ -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)) { -- 2.26.2