From f82e12e43f91064bab1faa20a9bdac3311c0ff85 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 28 Feb 1996 00:26:25 +0000 Subject: [PATCH] If starttime is not set, then use authtime as a default. (This fixes the bug where if you try to immediately use a TGT to get a ticket, you get a time skew error.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7558 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/asn.1/ChangeLog | 7 +++++++ src/lib/krb5/asn.1/krb5_decode.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index b6fc5319c..9aba1388c 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,10 @@ +Tue Feb 27 19:23:55 1996 Theodore Y. Ts'o + + * krb5_decode.c (decode_krb5_enc_tkt_part): If starttime is not + set, then use authtime as a default. (This fixes the bug + where if you try to immediately use a TGT to get a ticket, + you get a time skew error.) + Wed Feb 7 00:23:18 1996 Theodore Y. Ts'o * Makefile.in: Folded in danw's changes to allow diff --git a/src/lib/krb5/asn.1/krb5_decode.c b/src/lib/krb5/asn.1/krb5_decode.c index 71d8c60ae..318a403a4 100644 --- a/src/lib/krb5/asn.1/krb5_decode.c +++ b/src/lib/krb5/asn.1/krb5_decode.c @@ -258,6 +258,8 @@ krb5_error_code decode_krb5_enc_tkt_part(code, rep) get_field((*rep)->transited,4,asn1_decode_transited_encoding); get_field((*rep)->times.authtime,5,asn1_decode_kerberos_time); opt_field((*rep)->times.starttime,6,asn1_decode_kerberos_time); + if (tagnum != 6) + (*rep)->times.starttime=(*rep)->times.authtime; get_field((*rep)->times.endtime,7,asn1_decode_kerberos_time); opt_field((*rep)->times.renew_till,8,asn1_decode_kerberos_time); opt_field((*rep)->caddrs,9,asn1_decode_host_addresses); -- 2.26.2