svn rev #23102: trunk/src/lib/krb5/krb/

ghudson@MIT.EDU ghudson at MIT.EDU
Fri Oct 30 23:03:54 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=23102
Commit By: ghudson
Log Message:
In lib/krb5/krb, ensure all function definition headers are in ANSI
style and have the function name at the beginning of a line.



Changed Files:
U   trunk/src/lib/krb5/krb/appdefault.c
U   trunk/src/lib/krb5/krb/copy_auth.c
U   trunk/src/lib/krb5/krb/fast.c
U   trunk/src/lib/krb5/krb/get_in_tkt.c
U   trunk/src/lib/krb5/krb/gic_pwd.c
U   trunk/src/lib/krb5/krb/init_keyblock.c
U   trunk/src/lib/krb5/krb/preauth2.c
U   trunk/src/lib/krb5/krb/t_authdata.c
U   trunk/src/lib/krb5/krb/t_etypes.c
U   trunk/src/lib/krb5/krb/t_kerb.c
Modified: trunk/src/lib/krb5/krb/appdefault.c
===================================================================
--- trunk/src/lib/krb5/krb/appdefault.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/appdefault.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -21,7 +21,8 @@
     0,
 };
 
-static int conf_boolean(char *s)
+static int
+conf_boolean(char *s)
 {
     const char * const *p;
     for(p=conf_yes; *p; p++) {
@@ -36,7 +37,8 @@
     return 0;
 }
 
-static krb5_error_code appdefault_get(krb5_context context, const char *appname, const krb5_data *realm, const char *option, char **ret_value)
+static krb5_error_code
+appdefault_get(krb5_context context, const char *appname, const krb5_data *realm, const char *option, char **ret_value)
 {
     profile_t profile;
     const char *names[5];

Modified: trunk/src/lib/krb5/krb/copy_auth.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_auth.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/copy_auth.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -195,9 +195,9 @@
     size_t length;
 };
 
-static krb5_error_code grow_find_authdata
-(krb5_context context, struct find_authdata_context *fctx,
- krb5_authdata *elem)
+static krb5_error_code
+grow_find_authdata(krb5_context context, struct find_authdata_context *fctx,
+                   krb5_authdata *elem)
 {
     krb5_error_code retval = 0;
     if (fctx->length == fctx->space) {
@@ -221,12 +221,9 @@
     return retval;
 }
 
-
-
-
-static krb5_error_code find_authdata_1
-(krb5_context context, krb5_authdata *const *in_authdat, krb5_authdatatype ad_type,
- struct find_authdata_context *fctx)
+static krb5_error_code
+find_authdata_1(krb5_context context, krb5_authdata *const *in_authdat,
+                krb5_authdatatype ad_type, struct find_authdata_context *fctx)
 {
     int i = 0;
     krb5_error_code retval=0;
@@ -254,11 +251,11 @@
 }
 
 
-krb5_error_code krb5int_find_authdata
-(krb5_context context, krb5_authdata *const * ticket_authdata,
- krb5_authdata * const *ap_req_authdata,
- krb5_authdatatype ad_type,
- krb5_authdata ***results)
+krb5_error_code
+krb5int_find_authdata(krb5_context context,
+                      krb5_authdata *const *ticket_authdata,
+                      krb5_authdata *const *ap_req_authdata,
+                      krb5_authdatatype ad_type, krb5_authdata ***results)
 {
     krb5_error_code retval = 0;
     struct find_authdata_context fctx;

Modified: trunk/src/lib/krb5/krb/fast.c
===================================================================
--- trunk/src/lib/krb5/krb/fast.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/fast.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -53,9 +53,10 @@
 #include "int-proto.h"
 
 
-static krb5_error_code fast_armor_ap_request
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_ccache ccache, krb5_data *target_realm)
+static krb5_error_code
+fast_armor_ap_request(krb5_context context,
+                      struct krb5int_fast_request_state *state,
+                      krb5_ccache ccache, krb5_data *target_realm)
 {
     krb5_error_code retval = 0;
     krb5_creds creds, *out_creds = NULL;
@@ -129,10 +130,11 @@
     return retval;
 }
 
-krb5_error_code krb5int_fast_as_armor
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_gic_opt_ext *opte,
- krb5_kdc_req *request)
+krb5_error_code
+krb5int_fast_as_armor(krb5_context context,
+                      struct krb5int_fast_request_state *state,
+                      krb5_gic_opt_ext *opte,
+                      krb5_kdc_req *request)
 {
     krb5_error_code retval = 0;
     krb5_ccache ccache = NULL;
@@ -159,10 +161,12 @@
 
 
 krb5_error_code
-krb5int_fast_prep_req (krb5_context context, struct krb5int_fast_request_state *state,
-                       krb5_kdc_req *request,
-                       const krb5_data *to_be_checksummed, kdc_req_encoder_proc encoder,
-                       krb5_data **encoded_request)
+krb5int_fast_prep_req(krb5_context context,
+                      struct krb5int_fast_request_state *state,
+                      krb5_kdc_req *request,
+                      const krb5_data *to_be_checksummed,
+                      kdc_req_encoder_proc encoder,
+                      krb5_data **encoded_request)
 {
     krb5_error_code retval = 0;
     krb5_pa_data *pa_array[2];
@@ -247,10 +251,11 @@
     return retval;
 }
 
-static krb5_error_code decrypt_fast_reply
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_pa_data **in_padata,
- krb5_fast_response **response)
+static krb5_error_code
+decrypt_fast_reply(krb5_context context,
+                   struct krb5int_fast_request_state *state,
+                   krb5_pa_data **in_padata,
+                   krb5_fast_response **response)
 {
     krb5_error_code retval = 0;
     krb5_data scratch;
@@ -319,8 +324,10 @@
  * whenever padata  is available (all the time with fast).
  */
 krb5_error_code
-krb5int_fast_process_error(krb5_context context, struct krb5int_fast_request_state *state,
-                           krb5_error **err_replyptr                       , krb5_pa_data ***out_padata,
+krb5int_fast_process_error(krb5_context context,
+                           struct krb5int_fast_request_state *state,
+                           krb5_error **err_replyptr,
+                           krb5_pa_data ***out_padata,
                            krb5_boolean *retry)
 {
     krb5_error_code retval = 0;
@@ -410,10 +417,11 @@
 }
 
 
-krb5_error_code krb5int_fast_process_response
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_kdc_rep *resp,
- krb5_keyblock **strengthen_key)
+krb5_error_code
+krb5int_fast_process_response(krb5_context context,
+                              struct krb5int_fast_request_state *state,
+                              krb5_kdc_rep *resp,
+                              krb5_keyblock **strengthen_key)
 {
     krb5_error_code retval = 0;
     krb5_fast_response *fast_response = NULL;
@@ -460,10 +468,11 @@
     return retval;
 }
 
-krb5_error_code krb5int_fast_reply_key(krb5_context context,
-                                       krb5_keyblock *strengthen_key,
-                                       krb5_keyblock *existing_key,
-                                       krb5_keyblock *out_key)
+krb5_error_code
+krb5int_fast_reply_key(krb5_context context,
+                       krb5_keyblock *strengthen_key,
+                       krb5_keyblock *existing_key,
+                       krb5_keyblock *out_key)
 {
     krb5_keyblock *key = NULL;
     krb5_error_code retval = 0;
@@ -503,8 +512,9 @@
     free(state);
 }
 
-krb5_pa_data * krb5int_find_pa_data
-(krb5_context context, krb5_pa_data *const *padata, krb5_preauthtype pa_type)
+krb5_pa_data *
+krb5int_find_pa_data(krb5_context context, krb5_pa_data *const *padata,
+                     krb5_preauthtype pa_type)
 {
     krb5_pa_data * const *tmppa;
 

Modified: trunk/src/lib/krb5/krb/get_in_tkt.c
===================================================================
--- trunk/src/lib/krb5/krb/get_in_tkt.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/get_in_tkt.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -97,7 +97,8 @@
  * This function performs 32 bit bounded addition so we can generate
  * lifetimes without overflowing krb5_int32
  */
-static krb5_int32 krb5int_addint32 (krb5_int32 x, krb5_int32 y)
+static krb5_int32
+krb5int_addint32 (krb5_int32 x, krb5_int32 y)
 {
     if ((x > 0) && (y > (KRB5_INT32_MAX - x))) {
         /* sum will be be greater than KRB5_INT32_MAX */

Modified: trunk/src/lib/krb5/krb/gic_pwd.c
===================================================================
--- trunk/src/lib/krb5/krb/gic_pwd.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/gic_pwd.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -407,10 +407,12 @@
 
     return(ret);
 }
-krb5_error_code krb5int_populate_gic_opt (
-    krb5_context context, krb5_gic_opt_ext **opte,
-    krb5_flags options, krb5_address * const *addrs, krb5_enctype *ktypes,
-    krb5_preauthtype *pre_auth_types, krb5_creds *creds)
+
+krb5_error_code
+krb5int_populate_gic_opt(krb5_context context, krb5_gic_opt_ext **opte,
+                         krb5_flags options, krb5_address *const *addrs,
+                         krb5_enctype *ktypes,
+                         krb5_preauthtype *pre_auth_types, krb5_creds *creds)
 {
     int i;
     krb5_int32 starttime;

Modified: trunk/src/lib/krb5/krb/init_keyblock.c
===================================================================
--- trunk/src/lib/krb5/krb/init_keyblock.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/init_keyblock.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -34,9 +34,9 @@
 #include "k5-int.h"
 #include <assert.h>
 
-krb5_error_code KRB5_CALLCONV  krb5_init_keyblock
-(krb5_context context, krb5_enctype enctype,
- size_t length, krb5_keyblock **out)
+krb5_error_code KRB5_CALLCONV
+krb5_init_keyblock(krb5_context context, krb5_enctype enctype,
+                   size_t length, krb5_keyblock **out)
 {
     return krb5int_c_init_keyblock (context, enctype, length, out);
 }

Modified: trunk/src/lib/krb5/krb/preauth2.c
===================================================================
--- trunk/src/lib/krb5/krb/preauth2.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/preauth2.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -624,16 +624,11 @@
     return d;
 }
 
-static
-krb5_error_code pa_salt(krb5_context context,
-                        krb5_kdc_req *request,
-                        krb5_pa_data *in_padata,
-                        krb5_pa_data **out_padata,
-                        krb5_data *salt, krb5_data *s2kparams,
-                        krb5_enctype *etype,
-                        krb5_keyblock *as_key,
-                        krb5_prompter_fct prompter, void *prompter_data,
-                        krb5_gic_get_as_key_fct gak_fct, void *gak_data)
+static krb5_error_code
+pa_salt(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
+        krb5_pa_data **out_padata, krb5_data *salt, krb5_data *s2kparams,
+        krb5_enctype *etype, krb5_keyblock *as_key, krb5_prompter_fct prompter,
+        void *prompter_data, krb5_gic_get_as_key_fct gak_fct, void *gak_data)
 {
     krb5_data tmp;
     krb5_error_code retval;
@@ -650,19 +645,13 @@
     return(0);
 }
 
-static
-krb5_error_code pa_fx_cookie(krb5_context context,
-                             krb5_kdc_req *request,
-                             krb5_pa_data *in_padata,
-                             krb5_pa_data **out_padata,
-                             krb5_data *salt,
-                             krb5_data *s2kparams,
-                             krb5_enctype *etype,
-                             krb5_keyblock *as_key,
-                             krb5_prompter_fct prompter,
-                             void *prompter_data,
-                             krb5_gic_get_as_key_fct gak_fct,
-                             void *gak_data)
+static krb5_error_code
+pa_fx_cookie(krb5_context context, krb5_kdc_req *request,
+             krb5_pa_data *in_padata, krb5_pa_data **out_padata,
+             krb5_data *salt, krb5_data *s2kparams, krb5_enctype *etype,
+             krb5_keyblock *as_key, krb5_prompter_fct prompter,
+             void *prompter_data, krb5_gic_get_as_key_fct gak_fct,
+             void *gak_data)
 {
     krb5_pa_data *pa = calloc(1, sizeof(krb5_pa_data));
     krb5_octet *contents;
@@ -680,19 +669,13 @@
     return 0;
 }
 
-static
-krb5_error_code pa_enc_timestamp(krb5_context context,
-                                 krb5_kdc_req *request,
-                                 krb5_pa_data *in_padata,
-                                 krb5_pa_data **out_padata,
-                                 krb5_data *salt,
-                                 krb5_data *s2kparams,
-                                 krb5_enctype *etype,
-                                 krb5_keyblock *as_key,
-                                 krb5_prompter_fct prompter,
-                                 void *prompter_data,
-                                 krb5_gic_get_as_key_fct gak_fct,
-                                 void *gak_data)
+static krb5_error_code
+pa_enc_timestamp(krb5_context context, krb5_kdc_req *request,
+                 krb5_pa_data *in_padata, krb5_pa_data **out_padata,
+                 krb5_data *salt, krb5_data *s2kparams, krb5_enctype *etype,
+                 krb5_keyblock *as_key, krb5_prompter_fct prompter,
+                 void *prompter_data, krb5_gic_get_as_key_fct gak_fct,
+                 void *gak_data)
 {
     krb5_error_code ret;
     krb5_pa_enc_ts pa_enc;
@@ -770,8 +753,8 @@
     return(0);
 }
 
-static
-char *sam_challenge_banner(krb5_int32 sam_type)
+static char *
+sam_challenge_banner(krb5_int32 sam_type)
 {
     char *label;
 
@@ -820,19 +803,11 @@
    draft.  This draft cannot be implemented as written.  This code is
    compatible with earlier versions of mit krb5 and cygnus kerbnet. */
 
-static
-krb5_error_code pa_sam(krb5_context context,
-                       krb5_kdc_req *request,
-                       krb5_pa_data *in_padata,
-                       krb5_pa_data **out_padata,
-                       krb5_data *salt,
-                       krb5_data *s2kparams,
-                       krb5_enctype *etype,
-                       krb5_keyblock *as_key,
-                       krb5_prompter_fct prompter,
-                       void *prompter_data,
-                       krb5_gic_get_as_key_fct gak_fct,
-                       void *gak_data)
+static krb5_error_code
+pa_sam(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
+       krb5_pa_data **out_padata, krb5_data *salt, krb5_data *s2kparams,
+       krb5_enctype *etype, krb5_keyblock *as_key, krb5_prompter_fct prompter,
+       void *prompter_data, krb5_gic_get_as_key_fct gak_fct, void *gak_data)
 {
     krb5_error_code             ret;
     krb5_data                   tmpsam;
@@ -1380,20 +1355,13 @@
 }
 #endif /* APPLE_PKINIT */
 
-static
-krb5_error_code pa_sam_2(krb5_context context,
-                         krb5_kdc_req *request,
-                         krb5_pa_data *in_padata,
-                         krb5_pa_data **out_padata,
-                         krb5_data *salt,
-                         krb5_data *s2kparams,
-                         krb5_enctype *etype,
-                         krb5_keyblock *as_key,
-                         krb5_prompter_fct prompter,
-                         void *prompter_data,
-                         krb5_gic_get_as_key_fct gak_fct,
-                         void *gak_data) {
-
+static krb5_error_code
+pa_sam_2(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
+         krb5_pa_data **out_padata, krb5_data *salt, krb5_data *s2kparams,
+         krb5_enctype *etype, krb5_keyblock *as_key,
+         krb5_prompter_fct prompter, void *prompter_data,
+         krb5_gic_get_as_key_fct gak_fct, void *gak_data)
+{
     krb5_error_code retval;
     krb5_sam_challenge_2 *sc2 = NULL;
     krb5_sam_challenge_2_body *sc2b = NULL;
@@ -1707,19 +1675,13 @@
     return(0);
 }
 
-static krb5_error_code pa_s4u_x509_user(
-    krb5_context context,
-    krb5_kdc_req *request,
-    krb5_pa_data *in_padata,
-    krb5_pa_data **out_padata,
-    krb5_data *salt,
-    krb5_data *s2kparams,
-    krb5_enctype *etype,
-    krb5_keyblock *as_key,
-    krb5_prompter_fct prompter,
-    void *prompter_data,
-    krb5_gic_get_as_key_fct gak_fct,
-    void *gak_data)
+static krb5_error_code
+pa_s4u_x509_user(krb5_context context, krb5_kdc_req *request,
+                 krb5_pa_data *in_padata, krb5_pa_data **out_padata,
+                 krb5_data *salt, krb5_data *s2kparams, krb5_enctype *etype,
+                 krb5_keyblock *as_key, krb5_prompter_fct prompter,
+                 void *prompter_data, krb5_gic_get_as_key_fct gak_fct,
+                 void *gak_data)
 {
     krb5_s4u_userid *userid = (krb5_s4u_userid *)gak_data; /* XXX private contract */
     krb5_pa_data *s4u_padata;

Modified: trunk/src/lib/krb5/krb/t_authdata.c
===================================================================
--- trunk/src/lib/krb5/krb/t_authdata.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/t_authdata.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -79,7 +79,8 @@
     assert(memcmp(adc1->contents, adc2->contents, adc1->length) == 0);
 }
 
-int main()
+int
+main()
 {
     krb5_context context;
     krb5_authdata **results;

Modified: trunk/src/lib/krb5/krb/t_etypes.c
===================================================================
--- trunk/src/lib/krb5/krb/t_etypes.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/t_etypes.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -131,7 +131,8 @@
     }
 };
 
-static void show_enctypes(krb5_context ctx, krb5_enctype *list)
+static void
+show_enctypes(krb5_context ctx, krb5_enctype *list)
 {
     unsigned int i;
 
@@ -143,9 +144,9 @@
     fprintf(stderr, "\n");
 }
 
-static void compare(krb5_context ctx, krb5_enctype *result,
-                    krb5_enctype *expected, const char *profstr,
-                    krb5_boolean weak)
+static void
+compare(krb5_context ctx, krb5_enctype *result, krb5_enctype *expected,
+        const char *profstr, krb5_boolean weak)
 {
     unsigned int i;
 

Modified: trunk/src/lib/krb5/krb/t_kerb.c
===================================================================
--- trunk/src/lib/krb5/krb/t_kerb.c	2009-10-31 02:36:01 UTC (rev 23101)
+++ trunk/src/lib/krb5/krb/t_kerb.c	2009-10-31 03:03:54 UTC (rev 23102)
@@ -25,7 +25,8 @@
 void test_set_realm (krb5_context, const char *, const char *);
 void usage (char *);
 
-void test_string_to_timestamp(krb5_context ctx, char *ktime)
+void
+test_string_to_timestamp(krb5_context ctx, char *ktime)
 {
     krb5_timestamp      timestamp;
     time_t              t;
@@ -40,7 +41,8 @@
     printf("Parsed time was %s", ctime(&t));
 }
 
-void test_425_conv_principal(krb5_context ctx, char *name, char *inst, char *realm)
+void
+test_425_conv_principal(krb5_context ctx, char *name, char *inst, char *realm)
 {
     krb5_error_code     retval;
     krb5_principal      princ;
@@ -62,7 +64,8 @@
     krb5_free_principal(ctx, princ);
 }
 
-void test_524_conv_principal(krb5_context ctx, char *name)
+void
+test_524_conv_principal(krb5_context ctx, char *name)
 {
     krb5_principal princ = 0;
     krb5_error_code retval;
@@ -89,7 +92,8 @@
         krb5_free_principal (ctx, princ);
 }
 
-void test_parse_name(krb5_context ctx, const char *name)
+void
+test_parse_name(krb5_context ctx, const char *name)
 {
     krb5_error_code retval;
     krb5_principal  princ = 0, princ2 = 0;
@@ -124,7 +128,8 @@
         krb5_free_principal(ctx, princ2);
 }
 
-void test_set_realm(krb5_context ctx, const char *name, const char *realm)
+void
+test_set_realm(krb5_context ctx, const char *name, const char *realm)
 {
     krb5_error_code retval;
     krb5_principal  princ = 0;
@@ -154,7 +159,8 @@
         krb5_free_principal(ctx, princ);
 }
 
-void usage(char *progname)
+void
+usage(char *progname)
 {
     fprintf(stderr, "%s: Usage: %s 425_conv_principal <name> <inst> <realm\n",
             progname, progname);




More information about the cvs-krb5 mailing list