[1996] in Kerberos-V5-bugs
problem in krb5_string_to_timestamp()
daemon@ATHENA.MIT.EDU (Paul Pomes)
Wed Jun 12 18:41:26 1996
Date: Wed, 12 Jun 1996 15:40:28 -0700 (PDT)
From: Paul Pomes <p-pomes@Qualcomm.com>
To: krb5-bugs@MIT.EDU
File is src/lib/krb5/krb/str_conv.c
Given a command such as
kinit -s 15:30
to obtain a post-dated ticket meant for 3:30 that afternoon, klist reveals
instead
Ticket cache: /tmp/krb5cc_3
Default principal: ppomes@GLOBALSTAR.COM
Valid starting Expires Service principal
05 Feb 36 21:58:16 06 Feb 36 07:58:16 krbtgt/GLOBALSTAR.COM@GLOBALSTAR.COM
In krb5_string_to_timestamp(), the string "15:30" matches element
atime_format_table[6] = 0xef793188 "%R"
(a shorthand for %H:%M) and returns
timebuf = {
tm_sec = 0
tm_min = 30
tm_hour = 15
tm_mday = 0
tm_mon = 0
tm_year = 0
tm_wday = 0
tm_yday = 0
tm_isdst = 0
}
The later call to mktime() doesn't help
timebuf = {
tm_sec = 16
tm_min = 58
tm_hour = 21
tm_mday = 5
tm_mon = 1
tm_year = 136
tm_wday = 2
tm_yday = 35
tm_isdst = 0
}
My fix for now is use more explicit timestamps, but this is pretty klunky.
/pbp