From: Ezra Peisach Date: Tue, 19 Mar 1996 16:27:56 +0000 (+0000) Subject: * tf_util.c (tf_get_cred): Issue date is written out as a long, X-Git-Tag: krb5-1.0-beta6~335 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=302d0dbc3f072bb9d6f8258ec88ba0be90be7a8d;p=krb5.git * tf_util.c (tf_get_cred): Issue date is written out as a long, read back in as same. I have kept the size as a long to be compatible with the Cygnus V4 distribution. The problem was introduced when we changed the include/kerberosIV structures to use 32 bit ints for timestamps. So, under OSF/1, tf_util would write out a 64 bit issue date, and then try reading back in a 32 bit one. Since Cygnus uses sizeof(long) we will too. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7667 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 37a4c9b2f..ee8fa0d8d 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 19 11:23:13 1996 Ezra Peisach + + * tf_util.c (tf_get_cred): Issue date is written out as a long, + read back in as same. + Sat Feb 24 09:27:08 1996 Ezra Peisach * g_svc_in_tkt.c, put_svc_key.c, rd_req.c, rd_svc_key.c: Declare diff --git a/src/lib/krb4/tf_util.c b/src/lib/krb4/tf_util.c index 7761b3d58..03a092fa6 100644 --- a/src/lib/krb4/tf_util.c +++ b/src/lib/krb4/tf_util.c @@ -374,6 +374,7 @@ int tf_get_cred(c) { KTEXT ticket = &c->ticket_st; /* pointer to ticket */ int k_errno; + long issue_date; if (fd < 0) { if (krb_debug) @@ -414,11 +415,12 @@ int tf_get_cred(c) /* don't try to read a silly amount into ticket->dat */ ticket->length > MAX_KTXT_LEN || tf_read((char *) (ticket->dat), ticket->length) < 1 || - tf_read((char *) &(c->issue_date), sizeof(c->issue_date)) < 1 + tf_read((char *) &(issue_date), sizeof(issue_date)) < 1 ) { tf_close(); return TKT_FIL_FMT; } + c->issue_date = issue_date; #ifdef TKT_SHMEM memcpy(c->session, tmp_shm_addr, KEY_SZ); tmp_shm_addr += KEY_SZ;