From: Theodore Tso Date: Thu, 13 Jan 1994 23:51:06 +0000 (+0000) Subject: Fixed for newly enforced memory handling convention in the Kerberos X-Git-Tag: krb5-1.0-beta3~34 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0428dd40843d3f41cdb5d27d3f9652f3117996b7;p=krb5.git Fixed for newly enforced memory handling convention in the Kerberos library (for the credentials structure). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3328 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c index a62a286d6..9f3c80d1c 100644 --- a/src/lib/gssapi/krb5/init_sec_context.c +++ b/src/lib/gssapi/krb5/init_sec_context.c @@ -72,8 +72,14 @@ make_ap_req(krb5_gss_cred_id_t cred, /* fill in the necessary fields in creds */ memset((char *) &creds, 0, sizeof(creds)); - creds.client = cred->princ; - creds.server = server; + + code = krb5_copy_principal(cred->princ, &creds.client); + if (code) + return code; + + code = krb5_copy_principal(server, &creds.server); + if (code) + return code; creds.times.endtime = *endtime; @@ -91,11 +97,6 @@ make_ap_req(krb5_gss_cred_id_t cred, /* free stuff which was created */ - /* XXXX There's a bug in krb5 here, but I have no clue what it is. - This is a workaround. */ - if (creds.client == cred->princ) - creds.client = NULL; - krb5_free_cred_contents(&creds); /* build up the token */