Make kim_credential_get_options set correct renewal lifetime
authorJustin Anderson <jander@mit.edu>
Sun, 28 Sep 2008 03:59:55 +0000 (03:59 +0000)
committerJustin Anderson <jander@mit.edu>
Sun, 28 Sep 2008 03:59:55 +0000 (03:59 +0000)
ticket: 6055

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20768 dc483132-0cff-0310-8789-dd5450dbe970

src/kim/lib/kim_credential.c

index c1d48e1b7aeef048bef12fde7b28be137f3844a5..8c7a347dfb4637542877421b619061bc6a237292 100644 (file)
@@ -843,7 +843,10 @@ kim_error kim_credential_get_options (kim_credential  in_credential,
     
     if (!err) {
         kim_lifetime rlifetime = (creds->ticket_flags & TKT_FLG_RENEWABLE ?
-                                  creds->times.renew_till : 0);
+                                  creds->times.renew_till -
+                                  (creds->times.starttime ?
+                                   creds->times.starttime :
+                                   creds->times.authtime) : 0);
         
         err = kim_options_set_renewal_lifetime (options, rlifetime);
     }