Date: | Tue, 17 Jun 2003 12:43:53 +1000 (GMT+1000) |
From: | Dave Shrimpton <shrimpto@its.uq.edu.au> |
To: | <krb5-bugs@mit.edu> |
Subject: | Patch for minor kadmin bug in 1.2.8 and earlier |
Hi,
Minor bug fix for kadmin in 1.2.8 in diff -c format.
/* Our timezone GMT+1000 manages to squeeze the year %Y
out of the 30 char limit in array 'out' in kadmin.c
eg when dates displayed in kadmin get
"Fri Jan 11 17:47:46 GMT+1000 "
and not
"Fri Jan 11 17:47 GMT+1000 2015"
You'll only notice this if your kadmin is displaying
times in a local timezone and not GMT or EST */
*** kadmin.c.dist Fri Oct 12 11:52:33 2001
--- kadmin.c Tue Jun 17 11:59:18 2003
***************
*** 122,132 ****
krb5_timestamp when;
{
struct tm *tm;
! static char out[30];
time_t lcltim = when;
tm = localtime(&lcltim);
! strftime(out, 30, "%a %b %d %H:%M:%S %Z %Y", tm);
return out;
}
--- 122,132 ----
krb5_timestamp when;
{
struct tm *tm;
! static char out[36];
time_t lcltim = when;
tm = localtime(&lcltim);
! strftime(out, 36, "%a %b %d %H:%M:%S %Z %Y", tm);
return out;
}
--
David Shrimpton Systems Programmer
Software Infrastructure, Information Technology Services
University of Qld 4072 shrimpto@its.uq.edu.au
Brisbane Australia Phone 61 7 3365 7408
Minor bug fix for kadmin in 1.2.8 in diff -c format.
/* Our timezone GMT+1000 manages to squeeze the year %Y
out of the 30 char limit in array 'out' in kadmin.c
eg when dates displayed in kadmin get
"Fri Jan 11 17:47:46 GMT+1000 "
and not
"Fri Jan 11 17:47 GMT+1000 2015"
You'll only notice this if your kadmin is displaying
times in a local timezone and not GMT or EST */
*** kadmin.c.dist Fri Oct 12 11:52:33 2001
--- kadmin.c Tue Jun 17 11:59:18 2003
***************
*** 122,132 ****
krb5_timestamp when;
{
struct tm *tm;
! static char out[30];
time_t lcltim = when;
tm = localtime(&lcltim);
! strftime(out, 30, "%a %b %d %H:%M:%S %Z %Y", tm);
return out;
}
--- 122,132 ----
krb5_timestamp when;
{
struct tm *tm;
! static char out[36];
time_t lcltim = when;
tm = localtime(&lcltim);
! strftime(out, 36, "%a %b %d %H:%M:%S %Z %Y", tm);
return out;
}
--
David Shrimpton Systems Programmer
Software Infrastructure, Information Technology Services
University of Qld 4072 shrimpto@its.uq.edu.au
Brisbane Australia Phone 61 7 3365 7408