Use krb5_rd_req instead of krb5_rd_req_decode, to eliminate some code
authorTheodore Tso <tytso@mit.edu>
Thu, 15 Sep 1994 15:11:02 +0000 (15:11 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 15 Sep 1994 15:11:02 +0000 (15:11 +0000)
duplication.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4241 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/rd_req_sim.c

index 215005df07f62ad84e22dcea752fb1d1ad32fbaf..9afcfe98d4f9799a9b4906d8971ce43841223719 100644 (file)
@@ -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
index eca653978f299b1bdfe0ee8212fe39f7132acc0e..e0c110247b238d67dce5ef406f82e28e9313eeb9 100644 (file)
@@ -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;
 }