[11123] in Kerberos-V5-bugs
[krbdev.mit.edu #6548] strptime() doesn't like being touched that way
daemon@ATHENA.MIT.EDU (Tom Yu via RT)
Wed Aug 19 18:57:07 2009
Mail-Followup-To: rt@krbdev.mit.edu
mail-copies-to: never
From: "Tom Yu via RT" <rt-comment@krbdev.MIT.EDU>
In-Reply-To: <rt-6548@krbdev.mit.edu>
Message-ID: <rt-6548-31633.4.95518206678732@krbdev.mit.edu>
To: "'AdminCc of krbdev.mit.edu Ticket #6548'":;"'AdminCc of krbdev.mit.edu Ticket #6548'":;@MIT.EDU
Date: Wed, 19 Aug 2009 22:56:35 +0000 (UTC)
Reply-To: rt-comment@krbdev.MIT.EDU
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krb5-bugs-bounces@mit.edu
I noticed this problem on Mac OS X, but we probably want to fix it in
the general case for portability reasons.
getepochtime(), called by krb5_ldap_get_time(), passes a format string
of "%Y%m%d%H%M%SZ" to strptime(), causing a a return of EINVAL on Mac
OS X when any KDC programs attempt to fetch the master key list when
using an LDAP back end. According to POSIX / SUS, the application
must provide nonalphanumeric separators between format specifiers in
the format string of strptime().
Experimentation with a test program implies that the "%Y" format
specifier to strptime() tries to eat as many digits as it can, which
is about ten. This happens to be the number of decimal digits
required to represent a 32-bit integer...
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs