From d3776d3c092e376c9c7099021e90e510837c56d3 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 15 Sep 1994 15:11:02 +0000 Subject: [PATCH] Use krb5_rd_req instead of krb5_rd_req_decode, to eliminate some code duplication. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4241 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 5 +++++ src/lib/krb5/krb/rd_req_sim.c | 21 ++------------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 215005df0..9afcfe98d 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,8 @@ +Thu Sep 15 11:08:39 1994 Theodore Y. Ts'o (tytso@dcl) + + * rd_req_sim.c (krb5_rd_req_simple): Use krb5_rd_req instead of + krb5_rd_req_decoded, to eliminate some code duplication. + Sat Aug 20 01:43:43 1994 Theodore Y. Ts'o (tytso at tsx-11) * mk_req_ext.c (krb5_generate_authenticator): Fix pointer aliasing diff --git a/src/lib/krb5/krb/rd_req_sim.c b/src/lib/krb5/krb/rd_req_sim.c index eca653978..e0c110247 100644 --- a/src/lib/krb5/krb/rd_req_sim.c +++ b/src/lib/krb5/krb/rd_req_sim.c @@ -56,24 +56,8 @@ const krb5_address *sender_addr; krb5_tkt_authent **authdat; { krb5_error_code retval; - krb5_ap_req *request; krb5_rcache rcache = 0; - if (!krb5_is_ap_req(inbuf)) - return KRB5KRB_AP_ERR_MSG_TYPE; - if (retval = decode_krb5_ap_req(inbuf, &request)) { - switch (retval) { -#ifdef KRB5_USE_ISDOE - case ISODE_50_LOCAL_ERR_BADMSGTYPE: -#else - case KRB5_BADMSGTYPE: -#endif - return KRB5KRB_AP_ERR_BADVERSION; - default: - return(retval); - } - } - if (server) { retval = krb5_get_server_rcache(krb5_princ_component(server, 0), &rcache); @@ -81,12 +65,11 @@ krb5_tkt_authent **authdat; goto cleanup; } - retval = krb5_rd_req_decoded(request, server, sender_addr, 0, 0, 0, - rcache, authdat); + retval = krb5_rd_req(inbuf, server, sender_addr, 0, 0, 0, + rcache, authdat); cleanup: if (rcache) krb5_rc_close(rcache); - krb5_free_ap_req(request); return retval; } -- 2.26.2