From: Chris Provenzano Date: Fri, 28 Apr 1995 01:40:58 +0000 (+0000) Subject: * auth_con.c (krb5_auth_con_getaddrs() and krb5_auth_con_getflags()): X-Git-Tag: krb5-1.0-beta5~163 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0b241dd3f6a0b8e551c01b4b098c2169bd511117;p=krb5.git * auth_con.c (krb5_auth_con_getaddrs() and krb5_auth_con_getflags()): Added for completeness. * mk_req_ext.c (krb5_mk_req_extended()) : Don't send the AP_OPTS_USE_SUBKEY option over the wire. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5589 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index eb60c3cec..3887c43a9 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,10 @@ +Thu Apr 27 21:36:01 1995 Chris Provenzano (proven@mit.edu) + + * auth_con.c (krb5_auth_con_getaddrs() and krb5_auth_con_getflags()): + Added for completeness. + * mk_req_ext.c (krb5_mk_req_extended()) : Don't send the + AP_OPTS_USE_SUBKEY option over the wire. + Thu Apr 27 17:40:20 1995 Keith Vetter (keithv@fusion.com) * adm_rw.c, mk_cred.c, rd_cred.c: diff --git a/src/lib/krb5/krb/auth_con.c b/src/lib/krb5/krb/auth_con.c index 6821a05d8..bcde9c2a8 100644 --- a/src/lib/krb5/krb/auth_con.c +++ b/src/lib/krb5/krb/auth_con.c @@ -85,6 +85,53 @@ krb5_auth_con_setaddrs(context, auth_context, local_addr, remote_addr) return 0; } +krb5_error_code +krb5_auth_con_getaddrs(context, auth_context, local_addr, remote_addr) + krb5_context context; + krb5_auth_context * auth_context; + krb5_address ** local_addr; + krb5_address ** remote_addr; +{ + krb5_address * tmp_addr; + + if (local_addr && auth_context->local_addr) { + if ((tmp_addr = (krb5_address *)malloc(sizeof(krb5_address))) == NULL) + return ENOMEM; + if (tmp_addr->contents = malloc(auth_context->local_addr->length)) { + memcpy(tmp_addr->contents, auth_context->local_addr->contents, + auth_context->local_addr->length); + tmp_addr->addrtype = auth_context->local_addr->addrtype; + tmp_addr->length = auth_context->local_addr->length; + *local_addr = tmp_addr; + } else { + free(tmp_addr); + return ENOMEM; + } + } + if ((remote_addr) && auth_context->remote_addr) { + if ((tmp_addr = (krb5_address *)malloc(sizeof(krb5_address))) == NULL) { + if (local_addr && auth_context->local_addr) { + krb5_free_address(context, *local_addr); + } + return ENOMEM; + } + if (tmp_addr->contents = malloc(auth_context->remote_addr->length)) { + memcpy(tmp_addr->contents, auth_context->remote_addr->contents, + auth_context->remote_addr->length); + tmp_addr->addrtype = auth_context->remote_addr->addrtype; + tmp_addr->length = auth_context->remote_addr->length; + *remote_addr = tmp_addr; + } else { + if (local_addr && auth_context->local_addr) { + krb5_free_address(context, *local_addr); + } + free(tmp_addr); + return ENOMEM; + } + } + return 0 ; +} + /* XXX this call is a hack. Fixed when I do the servers. */ krb5_error_code krb5_auth_con_setkey(context, auth_context, keyblock) @@ -239,6 +286,16 @@ krb5_auth_con_setflags(context, auth_context, flags) return 0; } +krb5_error_code +krb5_auth_con_getflags(context, auth_context, flags) + krb5_context context; + krb5_auth_context * auth_context; + krb5_int32 * flags; +{ + *flags = auth_context->auth_context_flags; + return 0; +} + krb5_error_code krb5_auth_con_setrcache(context, auth_context, rcache) krb5_context context; @@ -248,4 +305,3 @@ krb5_auth_con_setrcache(context, auth_context, rcache) auth_context->rcache = rcache; return 0; } - diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index 727931aee..b9cd8f4b0 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -87,8 +87,8 @@ krb5_mk_req_extended(context, auth_context, ap_req_options, in_data, in_creds, krb5_encrypt_block eblock; krb5_data *toutbuf; + request.ap_options = ap_req_options & AP_OPTS_WIRE_MASK; request.authenticator.ciphertext.data = 0; - request.ap_options = ap_req_options; request.ticket = 0; if (!in_creds->ticket.length)