* do_as_req.c, do_tgs_req.c, kdc_preauth.c, kdc_util.h, kerberos_v4.c, main.c,
authorKen Raeburn <raeburn@mit.edu>
Tue, 10 Apr 2001 06:23:30 +0000 (06:23 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 10 Apr 2001 06:23:30 +0000 (06:23 +0000)
policy.h: Don't use macros PROTOTYPE or KRB5_PROTOTYPE.
* kerberos_v4.c (req_act_vno): Delete variable definition.
(kerberos_v4): Don't set it.

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

src/kdc/ChangeLog
src/kdc/do_as_req.c
src/kdc/do_tgs_req.c
src/kdc/kdc_preauth.c
src/kdc/kdc_util.h
src/kdc/kerberos_v4.c
src/kdc/main.c
src/kdc/policy.h

index af73c84ebea1a81f4de1129dd2e101d4af8b0f18..959ac2e4c8085e3043d3e00aa08e3efbef551476 100644 (file)
@@ -1,3 +1,11 @@
+2001-04-10  Ken Raeburn  <raeburn@mit.edu>
+
+       * do_as_req.c, do_tgs_req.c, kdc_preauth.c, kdc_util.h,
+       kerberos_v4.c, main.c, policy.h: Don't use macros PROTOTYPE or
+       KRB5_PROTOTYPE.
+       * kerberos_v4.c (req_act_vno): Delete variable definition.
+       (kerberos_v4): Don't set it.
+
 2001-03-08  Ezra Peisach  <epeisach@kangaroo.mit.edu>
 
        * do_as_req.c: If KRBCONF_KDC_MODIFIES_KDB defined, produce code
index c61d2e4ffe02fd9978078ad60b3c3e1b8b724531..d3ce8d147027ac7c629bf259faa2c60ce2a0843c 100644 (file)
 #include "adm_proto.h"
 #include "extern.h"
 
-static krb5_error_code prepare_error_as PROTOTYPE((krb5_kdc_req *,
-                                                  int,
-                                                  krb5_data *, 
-                                                  krb5_data **));
+static krb5_error_code prepare_error_as (krb5_kdc_req *, int, krb5_data *, 
+                                        krb5_data **);
 
 /*ARGSUSED*/
 krb5_error_code
index e5c6d1ac7cd208a54e0e844f049d9f65ac5f5287..a6c0e5eb2e7b0d2902537db8a292ed7e68bd0b63 100644 (file)
 #include "adm_proto.h"
 
 
-static void find_alternate_tgs PROTOTYPE((krb5_kdc_req *,
-                                         krb5_db_entry *,
-                                         krb5_boolean *,
-                                         int *));
-
-static krb5_error_code prepare_error_tgs PROTOTYPE((krb5_kdc_req *,
-                                                   krb5_ticket *,
-                                                   int,
-                                                   const char *,
-                                                   krb5_data **));
+static void find_alternate_tgs (krb5_kdc_req *, krb5_db_entry *,
+                               krb5_boolean *, int *);
+
+static krb5_error_code prepare_error_tgs (krb5_kdc_req *, krb5_ticket *,
+                                         int, const char *, krb5_data **);
 
 /*ARGSUSED*/
 krb5_error_code
index 759a480c618efc125eda059a04a9e7997992121e..9721a2ceacdb7910831ae028fd72ab022eedbc4c 100644 (file)
 #include <syslog.h>
 
 typedef krb5_error_code (*verify_proc)
-    KRB5_PROTOTYPE((krb5_context, krb5_db_entry *client,
+    (krb5_context, krb5_db_entry *client,
                    krb5_kdc_req *request,
-                   krb5_enc_tkt_part * enc_tkt_reply, krb5_pa_data *data));
+                   krb5_enc_tkt_part * enc_tkt_reply, krb5_pa_data *data);
 
 typedef krb5_error_code (*edata_proc)
-    KRB5_PROTOTYPE((krb5_context, krb5_kdc_req *request,
+    (krb5_context, krb5_kdc_req *request,
                    krb5_db_entry *client, krb5_db_entry *server,
-                   krb5_pa_data *data));
+                   krb5_pa_data *data);
 
 typedef krb5_error_code (*return_proc)
-    KRB5_PROTOTYPE((krb5_context, krb5_pa_data * padata, 
+    (krb5_context, krb5_pa_data * padata, 
                    krb5_db_entry *client,
                    krb5_kdc_req *request, krb5_kdc_rep *reply,
                    krb5_key_data *client_key,
                    krb5_keyblock *encrypting_key,
-                   krb5_pa_data **send_pa));
+                   krb5_pa_data **send_pa);
 
 typedef struct _krb5_preauth_systems {
     char *     name;
@@ -86,39 +86,39 @@ typedef struct _krb5_preauth_systems {
 } krb5_preauth_systems;
 
 static krb5_error_code verify_enc_timestamp
-    KRB5_PROTOTYPE((krb5_context, krb5_db_entry *client,
+    (krb5_context, krb5_db_entry *client,
                    krb5_kdc_req *request,
-                   krb5_enc_tkt_part * enc_tkt_reply, krb5_pa_data *data));
+                   krb5_enc_tkt_part * enc_tkt_reply, krb5_pa_data *data);
 
 static krb5_error_code get_etype_info
-    KRB5_PROTOTYPE((krb5_context, krb5_kdc_req *request,
+    (krb5_context, krb5_kdc_req *request,
                    krb5_db_entry *client, krb5_db_entry *server,
-                   krb5_pa_data *data));
+                   krb5_pa_data *data);
 static krb5_error_code return_pw_salt
-    KRB5_PROTOTYPE((krb5_context, krb5_pa_data * padata, 
+    (krb5_context, krb5_pa_data * padata, 
                    krb5_db_entry *client,
                    krb5_kdc_req *request, krb5_kdc_rep *reply,
                    krb5_key_data *client_key,
                    krb5_keyblock *encrypting_key,
-                   krb5_pa_data **send_pa));
+                   krb5_pa_data **send_pa);
 
 /* SAM preauth support */
 static krb5_error_code verify_sam_response
-    KRB5_PROTOTYPE((krb5_context, krb5_db_entry *client,
+    (krb5_context, krb5_db_entry *client,
                    krb5_kdc_req *request,
-                   krb5_enc_tkt_part * enc_tkt_reply, krb5_pa_data *data));
+                   krb5_enc_tkt_part * enc_tkt_reply, krb5_pa_data *data);
 
 static krb5_error_code get_sam_edata
-    KRB5_PROTOTYPE((krb5_context, krb5_kdc_req *request,
+    (krb5_context, krb5_kdc_req *request,
                    krb5_db_entry *client, krb5_db_entry *server,
-                   krb5_pa_data *data));
+                   krb5_pa_data *data);
 static krb5_error_code return_sam_data
-    KRB5_PROTOTYPE((krb5_context, krb5_pa_data * padata, 
+    (krb5_context, krb5_pa_data * padata, 
                    krb5_db_entry *client,
                    krb5_kdc_req *request, krb5_kdc_rep *reply,
                    krb5_key_data *client_key,
                    krb5_keyblock *encrypting_key,
-                   krb5_pa_data **send_pa));
+                   krb5_pa_data **send_pa);
 /*
  * Preauth property flags
  */
index 450d78568155b82e69fb70b952590bad117d290f..a80073b2c2b17c31fa4aa09985a96621c6bca1be 100644 (file)
@@ -34,128 +34,128 @@ typedef struct _krb5_fulladdr {
     krb5_ui_4          port;
 } krb5_fulladdr;
 
-krb5_error_code check_hot_list PROTOTYPE((krb5_ticket *));
-krb5_boolean realm_compare PROTOTYPE((krb5_principal, krb5_principal));
-krb5_boolean krb5_is_tgs_principal PROTOTYPE((krb5_principal));
-krb5_error_code add_to_transited PROTOTYPE((krb5_data *,
+krb5_error_code check_hot_list (krb5_ticket *);
+krb5_boolean realm_compare (krb5_principal, krb5_principal);
+krb5_boolean krb5_is_tgs_principal (krb5_principal);
+krb5_error_code add_to_transited (krb5_data *,
                                            krb5_data *,
                                            krb5_principal,
                                            krb5_principal,
-                                           krb5_principal));
-krb5_error_code compress_transited PROTOTYPE((krb5_data *,
+                                           krb5_principal);
+krb5_error_code compress_transited (krb5_data *,
                                              krb5_principal,
-                                             krb5_data *));
-krb5_error_code concat_authorization_data PROTOTYPE((krb5_authdata **,
+                                             krb5_data *);
+krb5_error_code concat_authorization_data (krb5_authdata **,
                                                     krb5_authdata **,
-                                                    krb5_authdata ***));
-krb5_error_code fetch_last_req_info PROTOTYPE((krb5_db_entry *,
-                                              krb5_last_req_entry ***));
+                                                    krb5_authdata ***);
+krb5_error_code fetch_last_req_info (krb5_db_entry *,
+                                              krb5_last_req_entry ***);
 
-krb5_error_code kdc_convert_key PROTOTYPE((krb5_keyblock *,
+krb5_error_code kdc_convert_key (krb5_keyblock *,
                                           krb5_keyblock *,
-                                          int));
+                                          int);
 krb5_error_code kdc_process_tgs_req 
-       PROTOTYPE((krb5_kdc_req *,
+       (krb5_kdc_req *,
                   const krb5_fulladdr *,
                   krb5_data *,
                   krb5_ticket **,
-                  krb5_keyblock **));
+                  krb5_keyblock **);
 
-krb5_error_code kdc_get_server_key PROTOTYPE((krb5_ticket *,
+krb5_error_code kdc_get_server_key (krb5_ticket *,
                                              krb5_keyblock **,
-                                             krb5_kvno *));
+                                             krb5_kvno *);
 
-int validate_as_request PROTOTYPE((krb5_kdc_req *, krb5_db_entry, 
+int validate_as_request (krb5_kdc_req *, krb5_db_entry, 
                                          krb5_db_entry, krb5_timestamp,
-                                         const char **));
+                                         const char **);
 
-int validate_tgs_request PROTOTYPE((krb5_kdc_req *, krb5_db_entry, 
+int validate_tgs_request (krb5_kdc_req *, krb5_db_entry, 
                                          krb5_ticket *, krb5_timestamp,
-                                         const char **));
+                                         const char **);
 
-int fetch_asn1_field PROTOTYPE((unsigned char *, unsigned int, unsigned int,
-                                krb5_data *));
+int fetch_asn1_field (unsigned char *, unsigned int, unsigned int,
+                                krb5_data *);
 
 int
-dbentry_has_key_for_enctype PROTOTYPE((krb5_context context,
+dbentry_has_key_for_enctype (krb5_context context,
                                       krb5_db_entry *client,
-                                      krb5_enctype enctype));
+                                      krb5_enctype enctype);
     
 int
-dbentry_supports_enctype PROTOTYPE((krb5_context context,
+dbentry_supports_enctype (krb5_context context,
                                    krb5_db_entry *client,
-                                   krb5_enctype enctype));
+                                   krb5_enctype enctype);
 
 krb5_enctype
-select_session_keytype PROTOTYPE((krb5_context context,
+select_session_keytype (krb5_context context,
                                  krb5_db_entry *server,
                                  int nktypes,
-                                 krb5_enctype *ktypes));
+                                 krb5_enctype *ktypes);
 
 krb5_error_code
-get_salt_from_key PROTOTYPE((krb5_context, krb5_principal,
-                            krb5_key_data *, krb5_data *));
+get_salt_from_key (krb5_context, krb5_principal,
+                            krb5_key_data *, krb5_data *);
 
-void limit_string PROTOTYPE((char *name));
+void limit_string (char *name);
 
 /* do_as_req.c */
-krb5_error_code process_as_req PROTOTYPE((krb5_kdc_req *,
+krb5_error_code process_as_req (krb5_kdc_req *,
                                          const krb5_fulladdr *,
                                          int,
-                                         krb5_data ** ));
+                                         krb5_data ** );
 
 /* do_tgs_req.c */
-krb5_error_code process_tgs_req PROTOTYPE((krb5_data *,
+krb5_error_code process_tgs_req (krb5_data *,
                                           const krb5_fulladdr *,
                                           int, 
-                                          krb5_data ** ));
+                                          krb5_data ** );
 /* dispatch.c */
-krb5_error_code dispatch PROTOTYPE((krb5_data *,
+krb5_error_code dispatch (krb5_data *,
                                    const krb5_fulladdr *,
                                    int,
-                                   krb5_data **));
+                                   krb5_data **);
 
 /* main.c */
-krb5_error_code kdc_initialize_rcache PROTOTYPE((krb5_context, char *));
+krb5_error_code kdc_initialize_rcache (krb5_context, char *);
 
-krb5_error_code setup_server_realm PROTOTYPE((krb5_principal));
+krb5_error_code setup_server_realm (krb5_principal);
 
 /* network.c */
-krb5_error_code listen_and_process PROTOTYPE((const char *));
-krb5_error_code setup_network PROTOTYPE((const char *));
-krb5_error_code closedown_network PROTOTYPE((const char *));
-void process_packet PROTOTYPE((int, const char *, int));
+krb5_error_code listen_and_process (const char *);
+krb5_error_code setup_network (const char *);
+krb5_error_code closedown_network (const char *);
+void process_packet (int, const char *, int);
 
 /* policy.c */
-int against_local_policy_as PROTOTYPE((krb5_kdc_req *, krb5_db_entry,
+int against_local_policy_as (krb5_kdc_req *, krb5_db_entry,
                                        krb5_db_entry, krb5_timestamp,
-                                       const char **));
+                                       const char **);
 
-int against_local_policy_tgs PROTOTYPE((krb5_kdc_req *, krb5_db_entry,
-                                       krb5_ticket *, const char **));
+int against_local_policy_tgs (krb5_kdc_req *, krb5_db_entry,
+                                       krb5_ticket *, const char **);
 
 /* kdc_preauth.c */
 const char * missing_required_preauth
-    PROTOTYPE((krb5_db_entry *client, krb5_db_entry *server,
-              krb5_enc_tkt_part *enc_tkt_reply));
-void get_preauth_hint_list PROTOTYPE((krb5_kdc_req * request,
+    (krb5_db_entry *client, krb5_db_entry *server,
+              krb5_enc_tkt_part *enc_tkt_reply);
+void get_preauth_hint_list (krb5_kdc_req * request,
                                      krb5_db_entry *client,
                                      krb5_db_entry *server,
-                                     krb5_data *e_data));
+                                     krb5_data *e_data);
 krb5_error_code check_padata
-    PROTOTYPE((krb5_context context, krb5_db_entry *client,
-              krb5_kdc_req *request, krb5_enc_tkt_part *enc_tkt_reply));
+    (krb5_context context, krb5_db_entry *client,
+              krb5_kdc_req *request, krb5_enc_tkt_part *enc_tkt_reply);
     
 krb5_error_code return_padata
-    PROTOTYPE((krb5_context context, krb5_db_entry *client,
+    (krb5_context context, krb5_db_entry *client,
               krb5_kdc_req *request, krb5_kdc_rep *reply,
-              krb5_key_data *client_key, krb5_keyblock *encrypting_key));
+              krb5_key_data *client_key, krb5_keyblock *encrypting_key);
     
 /* replay.c */
-krb5_boolean kdc_check_lookaside PROTOTYPE((krb5_data *, const krb5_fulladdr *,
-                                           krb5_data **));
-void kdc_insert_lookaside PROTOTYPE((krb5_data *, const krb5_fulladdr *,
-                                    krb5_data *));
+krb5_boolean kdc_check_lookaside (krb5_data *, const krb5_fulladdr *,
+                                           krb5_data **);
+void kdc_insert_lookaside (krb5_data *, const krb5_fulladdr *,
+                                    krb5_data *);
 
 /* sock2p.c */
 #ifndef HAVE_INET_NTOP
@@ -173,11 +173,11 @@ extern void sockaddr2p (const struct sockaddr *, char *, size_t, int *);
 #define clear(flagfield, flag) (flagfield &= ~(flag))
 
 #ifdef KRB5_KRB4_COMPAT
-krb5_error_code process_v4 PROTOTYPE((const krb5_data *,
+krb5_error_code process_v4 (const krb5_data *,
                                      const krb5_fulladdr *,
                                      int is_secondary,
-                                     krb5_data **));
-void process_v4_mode PROTOTYPE((const char *, const char *));
+                                     krb5_data **);
+void process_v4_mode (const char *, const char *);
 #else
 #define process_v4(foo,bar,quux,foobar)        KRB5KRB_AP_ERR_BADVERSION
 #endif
index 3e18ac61484fd07291fcbb349e866bf1880540ca..bf9a996ad7938ddaac53d6f7f048a01f78c9f39a 100644 (file)
 
 extern int errno;
 
-static int compat_decrypt_key PROTOTYPE((krb5_key_data *, C_Block,
-                                        krb5_keyblock *, int));
-static int kerb_get_principal PROTOTYPE((char *, char *, Principal *, int,
+static int compat_decrypt_key (krb5_key_data *, C_Block,
+                                        krb5_keyblock *, int);
+static int kerb_get_principal (char *, char *, Principal *, int,
                                         int *, krb5_keyblock *, krb5_kvno,
-                                        int, krb5_deltat *));
-static int check_princ PROTOTYPE((char *, char *, int, Principal *,
-                                 krb5_keyblock *, int, krb5_deltat *));
+                                        int, krb5_deltat *);
+static int check_princ (char *, char *, int, Principal *,
+                                 krb5_keyblock *, int, krb5_deltat *);
 
 #ifdef HAVE_STDARG_H
-char * v4_klog KRB5_PROTOTYPE((int, const char *, ...));
+char * v4_klog (int, const char *, ...);
 #else
-char * v4_klog KRB5_PROTOTYPE((int, char *, va_dcl));
+char * v4_klog (int, char *, va_dcl);
 #endif
 #define klog v4_klog
 
@@ -113,8 +113,6 @@ static char *req_realm_ptr;
 
 static krb5_ui_4 req_time_ws;
 
-int req_act_vno = KRB_PROT_VERSION; /* Temporary for version skew */
-
 static char local_realm[REALM_SZ];
 
 static long n_auth_req;
@@ -147,9 +145,9 @@ static void hang();
 static krb5_error_code retval; 
 static krb5_data *response;
 
-void kerberos_v4 PROTOTYPE((struct sockaddr_in *, KTEXT));
-void kerb_err_reply PROTOTYPE((struct sockaddr_in *, KTEXT, long, char *));
-static int set_tgtkey PROTOTYPE((char *, krb5_kvno));
+void kerberos_v4 (struct sockaddr_in *, KTEXT);
+void kerb_err_reply (struct sockaddr_in *, KTEXT, long, char *);
+static int set_tgtkey (char *, krb5_kvno);
 
 /* Attributes converted from V5 to V4 - internal representation */
 #define V4_KDB_REQUIRES_PREAUTH  0x1
@@ -624,8 +622,6 @@ kerberos_v4(client, pkt)
     req_version = pkt_version(pkt);    /* 1 byte, version */
     req_msg_type = pkt_msg_type(pkt);  /* 1 byte, Kerberos msg type */
 
-    req_act_vno = req_version;
-
     /* set these to point to something safe */
     req_name_ptr = req_inst_ptr = req_realm_ptr = "";
 
index c26782f0c2cc6267612330289995af768b735683..fdaec3562521f0a4ddf159827d17436ccf3ea3e5 100644 (file)
 #include <netinet/in.h>
 #endif
 
-kdc_realm_t *find_realm_data PROTOTYPE((char *, krb5_ui_4));
+kdc_realm_t *find_realm_data (char *, krb5_ui_4);
 
-void usage PROTOTYPE((char *));
+void usage (char *);
 
-krb5_sigtype request_exit PROTOTYPE((int));
-krb5_sigtype request_hup  PROTOTYPE((int));
+krb5_sigtype request_exit (int);
+krb5_sigtype request_hup  (int);
 
-void setup_signal_handlers PROTOTYPE((void));
+void setup_signal_handlers (void);
 
-krb5_error_code setup_sam PROTOTYPE((void));
+krb5_error_code setup_sam (void);
 
-void initialize_realms PROTOTYPE((krb5_context, int, char **));
+void initialize_realms (krb5_context, int, char **);
 
-void finish_realms PROTOTYPE((char *));
+void finish_realms (char *);
 
 static int nofork = 0;
 static int rkey_init_done = 0;
index ce2c31c781a1e4e5c1c38add9513d46aec622ea8..fe830762591288472b91d02cec997fff07897c61 100644 (file)
 #ifndef __KRB5_KDC_POLICY__
 #define __KRB5_KDC_POLICY__
 
-extern int against_postdate_policy PROTOTYPE((krb5_timestamp));
+extern int against_postdate_policy (krb5_timestamp);
 
-extern int against_flag_policy_as PROTOTYPE((const krb5_kdc_req *));
+extern int against_flag_policy_as (const krb5_kdc_req *);
 
-extern int against_flag_policy_tgs PROTOTYPE((const krb5_kdc_req *,
-                                             const krb5_ticket *));
+extern int against_flag_policy_tgs (const krb5_kdc_req *,
+                                             const krb5_ticket *);
 
 #endif /* __KRB5_KDC_POLICY__ */