fixes ticket-forwarding crashes on linux..
authorMark Eichin <eichin@mit.edu>
Mon, 18 Mar 1996 02:39:51 +0000 (02:39 +0000)
committerMark Eichin <eichin@mit.edu>
Mon, 18 Mar 1996 02:39:51 +0000 (02:39 +0000)
* 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
src/lib/krb5/krb/copy_addrs.c
src/lib/krb5/krb/mk_cred.c

index 7983fc74c7127732310849f12db4a51c2e6918d0..613607ce91affba7dd8c307635950def7a133b4b 100644 (file)
@@ -6,6 +6,13 @@ Sun Mar 17 20:32:08 1996  Ezra Peisach  <epeisach@dumpster.rose.brandeis.edu>
         * 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  <eichin@cygnus.com>
+
+       * 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  <basch@lehman.com>
 
        * in_tkt_ktb.c: Close the keytab if we opened it, not if the
index 18ecf5a80596fd1885d40cdf928176a8f2ef9aaa..4d93ebf98a434e40638249038c4d44209f19ae97 100644 (file)
@@ -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;
index ceb8678ad51897e6f9b3ce7fdd17592477a46de7..717272651b67609235d55bf53ad760d136fdc640 100644 (file)
@@ -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;