From: Paul Park Date: Mon, 22 May 1995 15:22:56 +0000 (+0000) Subject: Do not report creds as expired if the expiration time is indefinite X-Git-Tag: krb5-1.0-beta6~1956 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=13fb2c183ce385e723562a0b346d93bd145e191e;p=krb5.git 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 --- 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)) {