add "from" arg
authorJohn Kohl <jtkohl@mit.edu>
Sat, 3 Feb 1990 17:09:56 +0000 (17:09 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Sat, 3 Feb 1990 17:09:56 +0000 (17:09 +0000)
clean up externs into an include file

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

src/kdc/do_as_req.c
src/kdc/do_tgs_req.c

index 472af5621d517d4f2ab48b5db7f6bc03784c3b34..0291ecce3ec406b5dc309f226703f908f563cdb0 100644 (file)
@@ -31,13 +31,7 @@ static char rcsid_do_as_req_c[] =
 
 #include "kdc_util.h"
 #include "policy.h"
-
-extern krb5_cs_table_entry *csarray[];
-extern int max_cryptosystem;           /* max entry in array */
-extern krb5_data empty_string;         /* initialized to {0, ""} */
-extern krb5_timestamp infinity;                /* greater than every valid timestamp */
-extern krb5_deltat max_life_for_realm; /* XXX should be a parameter? */
-extern krb5_deltat max_renewable_life_for_realm; /* XXX should be a parameter? */
+#include "extern.h"
 
 static krb5_error_code prepare_error_as PROTOTYPE((krb5_as_req *,
                                                int,
@@ -49,9 +43,11 @@ static krb5_error_code prepare_error_as PROTOTYPE((krb5_as_req *,
 
 /* XXX needs lots of cleanup and modularizing */
 
+/*ARGSUSED*/
 krb5_error_code
-process_as_req(request, response)
+process_as_req(request, from, response)
 register krb5_as_req *request;
+krb5_fulladdr *from;                   /* who sent it ? */
 krb5_data **response;                  /* filled in with a response packet */
 {
 
@@ -109,7 +105,7 @@ krb5_data **response;                       /* filled in with a response packet */
        return(prepare_error_as(request, KDC_ERR_ETYPE_NOSUPP, response));
     }
 
-    if (retval = (*(csarray[request->etype]->system->random_key))(csarray[request->etype]->random_sequence, &session_key)) {
+    if (retval = (*(krb5_csarray[request->etype]->system->random_key))(krb5_csarray[request->etype]->random_sequence, &session_key)) {
        /* random key failed */
        cleanup();
        return(retval);
index e2830a91e6d0cb7424dbbeb9a97a64781bfefc23..a28e6cdcb00511cea156fb5347d820103e09b32e 100644 (file)
@@ -31,22 +31,19 @@ static char rcsid_do_tgs_req_c[] =
 
 #include "kdc_util.h"
 #include "policy.h"
+#include "extern.h"
 
-extern krb5_cs_table_entry *csarray[];
-extern int max_cryptosystem;           /* max entry in array */
-extern krb5_data empty_string;         /* initialized to {0, ""} */
-extern krb5_timestamp infinity;                /* greater than every valid timestamp */
-extern krb5_deltat max_life_for_realm; /* XXX should be a parameter? */
-extern krb5_deltat max_renewable_life_for_realm; /* XXX should be a parameter? */
 
 static krb5_error_code prepare_error_tgs PROTOTYPE((krb5_tgs_req *,
                                                int,
                                                krb5_data **));
 static krb5_error_code decrypt_second_ticket PROTOTYPE((krb5_ticket *));
 
+/*ARGSUSED*/
 krb5_error_code
-process_tgs_req(request, response)
+process_tgs_req(request, from, response)
 register krb5_tgs_req *request;
+krb5_fulladdr *from;                   /* who sent it ? */
 krb5_data **response;                  /* filled in with a response packet */
 {
 
@@ -121,7 +118,7 @@ krb5_data **response;                       /* filled in with a response packet */
        }
        session_key = second_ticket->enc_part2->session;
     } else {
-       if (retval = (*(csarray[request->etype]->system->random_key))(csarray[request->etype]->random_sequence, &session_key)) {
+       if (retval = (*(krb5_csarray[request->etype]->system->random_key))(krb5_csarray[request->etype]->random_sequence, &session_key)) {
            /* random key failed */
            cleanup();
            return(retval);
@@ -303,7 +300,7 @@ krb5_data **response;                       /* filled in with a response packet */
     } else {
        /* assemble new transited field into allocated storage */
        if (retval =
-           compress_transited(header_ticket->enc_part2->transited,
+           compress_transited(&header_ticket->enc_part2->transited,
                               header_ticket->server,
                               &enc_tkt_reply.transited)) {
            cleanup();