diff options
| author | Theodore Tso <tytso@mit.edu> | 1991-02-19 19:35:12 +0000 |
|---|---|---|
| committer | Theodore Tso <tytso@mit.edu> | 1991-02-19 19:35:12 +0000 |
| commit | 9652b5a3cde3757f5f30850ef4a9d1f457d22e4c (patch) | |
| tree | 9036023ab29f9a3ad6e05240b4607e4f1ce53d2c /src | |
| parent | 1fcb89646db00fca92ef462298c38dd1f63dc1cb (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/krb5/krb/gc_via_tgt.c | 15 |
1 files 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 * <krb5/copyright.h>. @@ -15,7 +16,6 @@ static char rcsid_gcvtgt_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> #include <krb5/krb5.h> #include <krb5/asn1.h> @@ -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; |
