+2002-09-11 Sam Hartman <hartmans@mit.edu>
+
+ * fwd_tgt.c (krb5_fwd_tgt_creds): If our initial tickets don't
+ have addresses, neither should forwarded tickets. Also, noticed
+ that cc was being used before initialized in some cases; fixed.
+
2002-09-02 Ken Raeburn <raeburn@mit.edu>
* addr_comp.c, addr_order.c, addr_srch.c, appdefault.c,
{
krb5_replay_data replaydata;
krb5_data * scratch = 0;
- krb5_address **addrs = 0;
+ krb5_address **addrs = NULL;
krb5_error_code retval;
krb5_creds creds, tgt;
krb5_creds *pcreds;
memcpy(rhost, server->data[1].data, server->data[1].length);
rhost[server->data[1].length] = '\0';
}
+ if (cc == 0) {
+ if ((retval = krb5int_cc_default(context, &cc)))
+ goto errout;
+ close_cc = 1;
+ }
retval = krb5_auth_con_getkey (context, auth_context, &session_key);
if (retval)
goto errout;
punt:
krb5_free_cred_contents (context, &in);
}
-
- retval = krb5_os_hostaddr(context, rhost, &addrs);
- if (retval)
- goto errout;
if ((retval = krb5_copy_principal(context, client, &creds.client)))
goto errout;
0)))
goto errout;
- if (cc == 0) {
- if ((retval = krb5int_cc_default(context, &cc)))
- goto errout;
- close_cc = 1;
- }
-
/* fetch tgt directly from cache */
retval = krb5_cc_retrieve_cred (context, cc, KRB5_TC_SUPPORTED_KTYPES,
&creds, &tgt);
goto errout;
}
+ if (tgt.addresses && *tgt.addresses) {
+ retval = krb5_os_hostaddr(context, rhost, &addrs);
+ if (retval)
+ goto errout;
+ }
+
creds.keyblock.enctype = enctype;
creds.times = tgt.times;
creds.times.starttime = 0;