summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/krb/rd_priv.c
diff options
context:
space:
mode:
authorChris Provenzano <proven@mit.edu>1995-04-26 03:03:26 +0000
committerChris Provenzano <proven@mit.edu>1995-04-26 03:03:26 +0000
commitb512f16eda5d2b4920490d2409d6a900030b32d0 (patch)
tree4985f920985db7c78f7673e0d09209c1b40f8fe3 /src/lib/krb5/krb/rd_priv.c
parent1c97a678883a123b1fb1be6e8954a619511fa093 (diff)
downloadkrb5-b512f16eda5d2b4920490d2409d6a900030b32d0.tar.gz
krb5-b512f16eda5d2b4920490d2409d6a900030b32d0.tar.xz
krb5-b512f16eda5d2b4920490d2409d6a900030b32d0.zip
* Makefile.in : Added gc_via_tkt.c and removed get_fcreds.c
* auth_con.c (krb5_auth_con_setaddrs()) : Fixed so it allocates space and copies addresses, not just pointer. * mk_cred.c: Completely rewritten from sources donated by asriniva. * rd_cred.c: Completely rewritten from sources donated by asriniva. * mk_priv.c (krb5_mk_priv()), mk_safe.c (krb5_mk_safe()), rd_priv.c (krb5_rd_priv()), and rd_safe (krb5_rd_safe()) : Try using a subkey before using the session key for encryption. * recvauth.c (krb5_recvauth()): Don't close the rcache on success. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5489 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/rd_priv.c')
-rw-r--r--src/lib/krb5/krb/rd_priv.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/lib/krb5/krb/rd_priv.c b/src/lib/krb5/krb/rd_priv.c
index 3c5a416ba5..71bca16473 100644
--- a/src/lib/krb5/krb/rd_priv.c
+++ b/src/lib/krb5/krb/rd_priv.c
@@ -136,7 +136,8 @@ krb5_rd_priv_basic(context, inbuf, keyblock, local_addr, remote_addr,
if (retval = krb5_os_localaddr(&our_addrs)) {
goto cleanup_data;
}
- if (!krb5_address_search(context, privmsg_enc_part->r_address, our_addrs)) {
+ if (!krb5_address_search(context, privmsg_enc_part->r_address,
+ our_addrs)) {
krb5_free_addresses(context, our_addrs);
retval = KRB5KRB_AP_ERR_BADADDR;
goto cleanup_data;
@@ -174,14 +175,20 @@ cleanup_privmsg:;
krb5_error_code
krb5_rd_priv(context, auth_context, inbuf, outbuf, outdata)
- krb5_context context;
- krb5_auth_context * auth_context;
- const krb5_data * inbuf;
- krb5_data * outbuf;
- krb5_replay_data * outdata;
+ krb5_context context;
+ krb5_auth_context * auth_context;
+ const krb5_data * inbuf;
+ krb5_data * outbuf;
+ krb5_replay_data * outdata;
{
- krb5_error_code retval;
- krb5_replay_data replaydata;
+ krb5_error_code retval;
+ krb5_keyblock * keyblock;
+ krb5_replay_data replaydata;
+
+ /* Get keyblock */
+ if ((keyblock = auth_context->local_subkey) == NULL)
+ if ((keyblock = auth_context->remote_subkey) == NULL)
+ keyblock = auth_context->keyblock;
if (((auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_RET_TIME) ||
(auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_RET_SEQUENCE)) &&
@@ -193,7 +200,7 @@ krb5_rd_priv(context, auth_context, inbuf, outbuf, outdata)
(auth_context->rcache == NULL))
return KRB5_RC_REQUIRED;
- if (retval = krb5_rd_priv_basic(context, inbuf, auth_context->keyblock,
+ if (retval = krb5_rd_priv_basic(context, inbuf, keyblock,
auth_context->local_addr, auth_context->remote_addr,
auth_context->i_vector, &replaydata, outbuf))
return retval;