diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/gssapi/krb5/inq_cred.c | 8 |
1 files 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)) { |
