From 805c9d544c84245b8323ec87c4102c7ebdd26459 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Mon, 18 Mar 1996 02:39:51 +0000 Subject: [PATCH] fixes ticket-forwarding crashes on linux.. * copy_addrs.c (krb5_copy_addr): make non-static so we can use it in mk_cred. * mk_cred.c (krb5_mk_ncred_basic): copy local_addr and remote_addr instead of just aliasing them, so we can safely free them ourselves. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7653 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 7 +++++++ src/lib/krb5/krb/copy_addrs.c | 2 +- src/lib/krb5/krb/mk_cred.c | 7 +++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 7983fc74c..613607ce9 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -6,6 +6,13 @@ Sun Mar 17 20:32:08 1996 Ezra Peisach * Makefile.in: Rework to be consistant with configure defines so that configure can specify other needed libraries. +Sun Mar 17 02:10:19 1996 Mark W. Eichin + + * copy_addrs.c (krb5_copy_addr): make non-static so we can use it + in mk_cred. + * mk_cred.c (krb5_mk_ncred_basic): copy local_addr and remote_addr + instead of just aliasing them, so we can safely free them ourselves. + Fri Mar 15 14:29:00 1996 Richard Basch * in_tkt_ktb.c: Close the keytab if we opened it, not if the diff --git a/src/lib/krb5/krb/copy_addrs.c b/src/lib/krb5/krb/copy_addrs.c index 18ecf5a80..4d93ebf98 100644 --- a/src/lib/krb5/krb/copy_addrs.c +++ b/src/lib/krb5/krb/copy_addrs.c @@ -26,7 +26,7 @@ #include "k5-int.h" -static krb5_error_code +krb5_error_code krb5_copy_addr(context, inad, outad) krb5_context context; const krb5_address *inad; diff --git a/src/lib/krb5/krb/mk_cred.c b/src/lib/krb5/krb/mk_cred.c index ceb8678ad..717272651 100644 --- a/src/lib/krb5/krb/mk_cred.c +++ b/src/lib/krb5/krb/mk_cred.c @@ -124,8 +124,11 @@ krb5_mk_ncred_basic(context, ppcreds, nppcreds, keyblock, credenc.magic = KV5M_CRED_ENC_PART; - credenc.s_address = local_addr; - credenc.r_address = remote_addr; + credenc.s_address = 0; + credenc.r_address = 0; + if (local_addr) krb5_copy_addr(context, local_addr, &credenc.s_address); + if (remote_addr) krb5_copy_addr(context, remote_addr, &credenc.r_address); + credenc.nonce = replaydata->seq; credenc.usec = replaydata->usec; credenc.timestamp = replaydata->timestamp; -- 2.26.2