From 461f24521c2306c4db29a5ac8fb8fd5512625765 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Tue, 2 Sep 2003 22:12:07 +0000 Subject: [PATCH] Apply patch from Cesar Garcia to fix lifetime computation in 524 ticket conversion. ticket: 1712 tags: pullup version_reported: 1.3.1 target_version: 1.3.2 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15808 dc483132-0cff-0310-8789-dd5450dbe970 --- src/krb524/ChangeLog | 5 +++++ src/krb524/cnv_tkt_skey.c | 2 +- src/lib/krb5/krb/ChangeLog | 5 +++++ src/lib/krb5/krb/conv_creds.c | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog index 6f7fe60d7..64f2a69f5 100644 --- a/src/krb524/ChangeLog +++ b/src/krb524/ChangeLog @@ -1,3 +1,8 @@ +2003-09-02 Tom Yu + + * cnv_tkt_skey.c (krb524_convert_tkt_skey): Apply patch from Cesar + Garcia to fix lifetime computation. + 2003-08-29 Ken Raeburn * configure.in: Call KRB5_AC_NEED_DAEMON instead of checking diff --git a/src/krb524/cnv_tkt_skey.c b/src/krb524/cnv_tkt_skey.c index c2ec9d816..97d8bbfdd 100644 --- a/src/krb524/cnv_tkt_skey.c +++ b/src/krb524/cnv_tkt_skey.c @@ -143,7 +143,7 @@ int krb524_convert_tkt_skey(context, v5tkt, v4tkt, v5_skey, v4_skey, if ((server_time + context->clockskew >= v5etkt->times.starttime) && (server_time - context->clockskew <= v5etkt->times.endtime)) { lifetime = krb_time_to_life(server_time, v5etkt->times.endtime); - v4endtime = krb_life_to_time(v5etkt->times.starttime, lifetime); + v4endtime = krb_life_to_time(server_time, lifetime); /* * Adjust start time backwards if the lifetime value * returned by krb_time_to_life() maps to a longer lifetime diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 229336eaf..5d777909a 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,8 @@ +2003-09-02 Tom Yu + + * conv_creds.c (krb524_convert_creds_plain): Apply patch from + Cesar Garcia to fix lifetime computation. + 2003-08-19 SamHartman * rd_cred.c (decrypt_credencdata): Don't double free credentials. diff --git a/src/lib/krb5/krb/conv_creds.c b/src/lib/krb5/krb/conv_creds.c index a4e5abc94..3a4e66dc5 100644 --- a/src/lib/krb5/krb/conv_creds.c +++ b/src/lib/krb5/krb/conv_creds.c @@ -130,7 +130,7 @@ krb524_convert_creds_plain(context, v5creds, v4creds) v4creds->issue_date = v5creds->times.starttime; v4creds->lifetime = krb5int_krb_time_to_life(v5creds->times.starttime, v5creds->times.endtime); - endtime = krb5int_krb_life_to_time(v5creds->times.starttime, + endtime = krb5int_krb_life_to_time(v4creds->issue_date, v4creds->lifetime); /* * Adjust start time backwards to deal with rounding up in -- 2.26.2