From 9652b5a3cde3757f5f30850ef4a9d1f457d22e4c Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 19 Feb 1991 19:35:12 +0000 Subject: [PATCH] Changed ot make it copy back the principal returned by the KDC Changed to conform with API interface changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1728 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/gc_via_tgt.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/lib/krb5/krb/gc_via_tgt.c b/src/lib/krb5/krb/gc_via_tgt.c index 99efd791f..21adddffa 100644 --- a/src/lib/krb5/krb/gc_via_tgt.c +++ b/src/lib/krb5/krb/gc_via_tgt.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -15,7 +16,6 @@ static char rcsid_gcvtgt_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include #include #include @@ -130,8 +130,8 @@ OLDDECLARG(krb5_creds *, cred) return KRB5_KDCREP_MODIFIED; } /* put pieces into cred-> */ - if (retval = krb5_copy_keyblock(dec_rep->enc_part2->session, - &cred->keyblock)) { + if (retval = krb5_copy_keyblock_contents(dec_rep->enc_part2->session, + &cred->keyblock)) { cleanup(); return retval; } @@ -180,6 +180,11 @@ OLDDECLARG(krb5_creds *, cred) cleanup(); return retval; } + if (retval = krb5_copy_principal(dec_rep->enc_part2->server, + &cred->server)) { + cleanup(); + return retval; + } if (retval = encode_krb5_ticket(dec_rep->ticket, &scratch)) { cleanup(); @@ -188,7 +193,7 @@ OLDDECLARG(krb5_creds *, cred) } cred->ticket = *scratch; - free((char *)scratch); + xfree(scratch); krb5_free_kdc_rep(dec_rep); return retval; -- 2.26.2