summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Basch <probe@mit.edu>1996-03-20 01:02:57 +0000
committerRichard Basch <probe@mit.edu>1996-03-20 01:02:57 +0000
commitcf8b97daa71f3f6ffc3dd3e81294c7177705c449 (patch)
treedb37cd5e524475b0117898ee045da53a01f92bf4 /src
parent8e59c2d75b3b3cd2ccc81e22495c9eb406c89a8b (diff)
downloadkrb5-cf8b97daa71f3f6ffc3dd3e81294c7177705c449.tar.gz
krb5-cf8b97daa71f3f6ffc3dd3e81294c7177705c449.tar.xz
krb5-cf8b97daa71f3f6ffc3dd3e81294c7177705c449.zip
* 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7671 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/krb524/ChangeLog6
-rw-r--r--src/krb524/conv_creds.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog
index 282941e2d..c9e7f1b6e 100644
--- a/src/krb524/ChangeLog
+++ b/src/krb524/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/src/krb524/conv_creds.c b/src/krb524/conv_creds.c
index 5ab295f2b..5346f883d 100644
--- a/src/krb524/conv_creds.c
+++ b/src/krb524/conv_creds.c
@@ -99,6 +99,7 @@ int krb524_convert_creds_plain(context, v5creds, v4creds)
{
unsigned long addr;
int ret;
+ krb5_timestamp lifetime;
memset((char *) v4creds, 0, sizeof(CREDENTIALS));
@@ -122,8 +123,10 @@ int krb524_convert_creds_plain(context, v5creds, v4creds)
/* 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 */