if the v5 lifetime is greater than the max v4 lifetime, use the max
v4 lifetime (0xff), rather than masking it with 0xff.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7671
dc483132-0cff-0310-8789-
dd5450dbe970
+Tue Mar 19 17:07:44 1996 Richard Basch <basch@lehman.com>
+
+ * conv_creds.c (krb524_convert_creds_plain):
+ if the v5 lifetime is greater than the max v4 lifetime, use the max
+ v4 lifetime (0xff), rather than masking it with 0xff.
+
Fri Jan 12 04:37:23 1996 Mark Eichin <eichin@cygnus.com>
* cnv_tkt_skey.c (krb524_convert_tkt_skey): rather than apply fit
{
unsigned long addr;
int ret;
+ krb5_timestamp lifetime;
memset((char *) v4creds, 0, sizeof(CREDENTIALS));
/* V4 has no concept of authtime or renew_till, so ignore them */
/* V4 lifetime is 1 byte, in 5 minute increments */
- v4creds->lifetime = 0xff &
+ lifetime =
((v5creds->times.endtime - v5creds->times.starttime) / 300);
+ v4creds->lifetime =
+ ((lifetime > 0xff) ? 0xff : lifetime);
v4creds->issue_date = v5creds->times.starttime;
/* XXX perhaps we should use the addr of the client host if */