From 1ebc2577bf7f06b54259b9b8a8d1f93583fa2997 Mon Sep 17 00:00:00 2001 From: Zhanna Tsitkov Date: Tue, 22 Dec 2009 22:26:55 +0000 Subject: [PATCH] Remove krb5_ prefix from some static func names git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23483 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/copy_auth.c | 22 ++++++++------ src/lib/krb5/krb/copy_tick.c | 5 ++-- src/lib/krb5/krb/gc_via_tkt.c | 47 +++++++++++++++--------------- src/lib/krb5/krb/get_creds.c | 32 ++++++++++----------- src/lib/krb5/krb/gic_opt.c | 1 - src/lib/krb5/krb/gic_pwd.c | 19 ++++++------ src/lib/krb5/krb/mk_priv.c | 14 ++++----- src/lib/krb5/krb/mk_req_ext.c | 54 +++++++++++++++++------------------ src/lib/krb5/krb/pr_to_salt.c | 19 +++++++----- 9 files changed, 111 insertions(+), 102 deletions(-) diff --git a/src/lib/krb5/krb/copy_auth.c b/src/lib/krb5/krb/copy_auth.c index 88bc3faf9..ca1c07718 100644 --- a/src/lib/krb5/krb/copy_auth.c +++ b/src/lib/krb5/krb/copy_auth.c @@ -58,7 +58,8 @@ #include "k5-int.h" static krb5_error_code -krb5_copy_authdatum(krb5_context context, const krb5_authdata *inad, krb5_authdata **outad) +copy_authdatum(krb5_context context, + const krb5_authdata *inad, krb5_authdata **outad) { krb5_authdata *tmpad; @@ -78,7 +79,9 @@ krb5_copy_authdatum(krb5_context context, const krb5_authdata *inad, krb5_authda * Copy an authdata array, with fresh allocation. */ krb5_error_code KRB5_CALLCONV -krb5_merge_authdata(krb5_context context, krb5_authdata *const *inauthdat1, krb5_authdata * const *inauthdat2, +krb5_merge_authdata(krb5_context context, + krb5_authdata *const *inauthdat1, + krb5_authdata * const *inauthdat2, krb5_authdata ***outauthdat) { krb5_error_code retval; @@ -103,8 +106,8 @@ krb5_merge_authdata(krb5_context context, krb5_authdata *const *inauthdat1, krb5 if (inauthdat1) { for (nelems = 0; inauthdat1[nelems]; nelems++) { - retval = krb5_copy_authdatum(context, inauthdat1[nelems], - &tempauthdat[nelems]); + retval = copy_authdatum(context, inauthdat1[nelems], + &tempauthdat[nelems]); if (retval) { krb5_free_authdata(context, tempauthdat); return retval; @@ -114,8 +117,8 @@ krb5_merge_authdata(krb5_context context, krb5_authdata *const *inauthdat1, krb5 if (inauthdat2) { for (nelems2 = 0; inauthdat2[nelems2]; nelems2++) { - retval = krb5_copy_authdatum(context, inauthdat2[nelems2], - &tempauthdat[nelems++]); + retval = copy_authdatum(context, inauthdat2[nelems2], + &tempauthdat[nelems++]); if (retval) { krb5_free_authdata(context, tempauthdat); return retval; @@ -203,7 +206,8 @@ grow_find_authdata(krb5_context context, struct find_authdata_context *fctx, if (fctx->length == fctx->space) { krb5_authdata **new; if (fctx->space >= 256) { - krb5_set_error_message(context, ERANGE, "More than 256 authdata matched a query"); + krb5_set_error_message(context, ERANGE, + "More than 256 authdata matched a query"); return ERANGE; } new = realloc(fctx->out, @@ -214,8 +218,8 @@ grow_find_authdata(krb5_context context, struct find_authdata_context *fctx, fctx->space *=2; } fctx->out[fctx->length+1] = NULL; - retval = krb5_copy_authdatum(context, elem, - &fctx->out[fctx->length]); + retval = copy_authdatum(context, elem, + &fctx->out[fctx->length]); if (retval == 0) fctx->length++; return retval; diff --git a/src/lib/krb5/krb/copy_tick.c b/src/lib/krb5/krb/copy_tick.c index 1fd3e681c..db0815315 100644 --- a/src/lib/krb5/krb/copy_tick.c +++ b/src/lib/krb5/krb/copy_tick.c @@ -31,7 +31,8 @@ #include "k5-int.h" static krb5_error_code -krb5_copy_enc_tkt_part(krb5_context context, const krb5_enc_tkt_part *partfrom, krb5_enc_tkt_part **partto) +copy_enc_tkt_part(krb5_context context, const krb5_enc_tkt_part *partfrom, + krb5_enc_tkt_part **partto) { krb5_error_code retval; krb5_enc_tkt_part *tempto; @@ -115,7 +116,7 @@ krb5_copy_ticket(krb5_context context, const krb5_ticket *from, krb5_ticket **pt } tempto->enc_part.ciphertext = *scratch; free(scratch); - retval = krb5_copy_enc_tkt_part(context, from->enc_part2, &tempto->enc_part2); + retval = copy_enc_tkt_part(context, from->enc_part2, &tempto->enc_part2); if (retval) { free(tempto->enc_part.ciphertext.data); krb5_free_principal(context, tempto->server); diff --git a/src/lib/krb5/krb/gc_via_tkt.c b/src/lib/krb5/krb/gc_via_tkt.c index df54621a1..0ab421383 100644 --- a/src/lib/krb5/krb/gc_via_tkt.c +++ b/src/lib/krb5/krb/gc_via_tkt.c @@ -33,7 +33,8 @@ #include "int-proto.h" static krb5_error_code -krb5_kdcrep2creds(krb5_context context, krb5_kdc_rep *pkdcrep, krb5_address *const *address, krb5_data *psectkt, krb5_creds **ppcreds) +kdcrep2creds(krb5_context context, krb5_kdc_rep *pkdcrep, krb5_address *const *address, + krb5_data *psectkt, krb5_creds **ppcreds) { krb5_error_code retval; krb5_data *pdata; @@ -156,9 +157,9 @@ tgt_is_local_realm(krb5_creds *tgt) } krb5_error_code -krb5_get_cred_via_tkt (krb5_context context, krb5_creds *tkt, - krb5_flags kdcoptions, krb5_address *const *address, - krb5_creds *in_cred, krb5_creds **out_cred) +krb5_get_cred_via_tkt(krb5_context context, krb5_creds *tkt, + krb5_flags kdcoptions, krb5_address *const *address, + krb5_creds *in_cred, krb5_creds **out_cred) { return krb5_get_cred_via_tkt_ext (context, tkt, kdcoptions, address, @@ -215,7 +216,7 @@ krb5int_make_tgs_request(krb5_context context, enctypes, in_cred->server, address, in_cred->authdata, in_padata, second_tkt ? - &in_cred->second_ticket : 0, + &in_cred->second_ticket : 0, tkt, pacb_fct, pacb_data, request_data, timestamp, nonce, subkey); @@ -247,8 +248,8 @@ krb5int_process_tgs_reply(krb5_context context, s4u2self = krb5int_find_pa_data(context, in_padata, KRB5_PADATA_S4U_X509_USER) || - krb5int_find_pa_data(context, in_padata, - KRB5_PADATA_FOR_USER); + krb5int_find_pa_data(context, in_padata, + KRB5_PADATA_FOR_USER); if (krb5_is_krb_error(response_data)) { retval = decode_krb5_error(response_data, &err_reply); @@ -282,7 +283,7 @@ krb5int_process_tgs_reply(krb5_context context, } krb5_free_error(context, err_reply); goto cleanup; - } else if (!krb5_is_tgs_rep(response_data)) { + } else if (!krb5_is_tgs_rep(response_data)) { retval = KRB5KRB_AP_ERR_MSG_TYPE; goto cleanup; } @@ -375,8 +376,8 @@ krb5int_process_tgs_reply(krb5_context context, dec_rep->enc_part2->enc_padata = NULL; } - retval = krb5_kdcrep2creds(context, dec_rep, address, - &in_cred->second_ticket, out_cred); + retval = kdcrep2creds(context, dec_rep, address, + &in_cred->second_ticket, out_cred); if (retval != 0) goto cleanup; @@ -391,19 +392,19 @@ cleanup: } krb5_error_code -krb5_get_cred_via_tkt_ext (krb5_context context, krb5_creds *tkt, - krb5_flags kdcoptions, krb5_address *const *address, - krb5_pa_data **in_padata, - krb5_creds *in_cred, - krb5_error_code (*pacb_fct)(krb5_context, - krb5_keyblock *, - krb5_kdc_req *, - void *), - void *pacb_data, - krb5_pa_data ***out_padata, - krb5_pa_data ***out_enc_padata, - krb5_creds **out_cred, - krb5_keyblock **out_subkey) +krb5_get_cred_via_tkt_ext(krb5_context context, krb5_creds *tkt, + krb5_flags kdcoptions, krb5_address *const *address, + krb5_pa_data **in_padata, + krb5_creds *in_cred, + krb5_error_code (*pacb_fct)(krb5_context, + krb5_keyblock *, + krb5_kdc_req *, + void *), + void *pacb_data, + krb5_pa_data ***out_padata, + krb5_pa_data ***out_enc_padata, + krb5_creds **out_cred, + krb5_keyblock **out_subkey) { krb5_error_code retval; krb5_data request_data; diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c index 491f86452..5b2c1c2fa 100644 --- a/src/lib/krb5/krb/get_creds.c +++ b/src/lib/krb5/krb/get_creds.c @@ -214,9 +214,9 @@ krb5_get_credentials(krb5_context context, krb5_flags options, #define INT_GC_RENEW 2 static krb5_error_code -krb5_get_credentials_val_renew_core(krb5_context context, krb5_flags options, - krb5_ccache ccache, krb5_creds *in_creds, - krb5_creds **out_creds, int which) +get_credentials_val_renew_core(krb5_context context, krb5_flags options, + krb5_ccache ccache, krb5_creds *in_creds, + krb5_creds **out_creds, int which) { krb5_error_code retval; krb5_principal tmp; @@ -258,9 +258,9 @@ krb5_get_credentials_validate(krb5_context context, krb5_flags options, krb5_ccache ccache, krb5_creds *in_creds, krb5_creds **out_creds) { - return(krb5_get_credentials_val_renew_core(context, options, ccache, - in_creds, out_creds, - INT_GC_VALIDATE)); + return(get_credentials_val_renew_core(context, options, ccache, + in_creds, out_creds, + INT_GC_VALIDATE)); } krb5_error_code KRB5_CALLCONV @@ -269,15 +269,15 @@ krb5_get_credentials_renew(krb5_context context, krb5_flags options, krb5_creds **out_creds) { - return(krb5_get_credentials_val_renew_core(context, options, ccache, - in_creds, out_creds, - INT_GC_RENEW)); + return(get_credentials_val_renew_core(context, options, ccache, + in_creds, out_creds, + INT_GC_RENEW)); } static krb5_error_code -krb5_validate_or_renew_creds(krb5_context context, krb5_creds *creds, - krb5_principal client, krb5_ccache ccache, - char *in_tkt_service, int validate) +validate_or_renew_creds(krb5_context context, krb5_creds *creds, + krb5_principal client, krb5_ccache ccache, + char *in_tkt_service, int validate) { krb5_error_code ret; krb5_creds in_creds; /* only client and server need to be filled in */ @@ -350,13 +350,13 @@ cleanup: krb5_error_code KRB5_CALLCONV krb5_get_validated_creds(krb5_context context, krb5_creds *creds, krb5_principal client, krb5_ccache ccache, char *in_tkt_service) { - return(krb5_validate_or_renew_creds(context, creds, client, ccache, - in_tkt_service, 1)); + return(validate_or_renew_creds(context, creds, client, ccache, + in_tkt_service, 1)); } krb5_error_code KRB5_CALLCONV krb5_get_renewed_creds(krb5_context context, krb5_creds *creds, krb5_principal client, krb5_ccache ccache, char *in_tkt_service) { - return(krb5_validate_or_renew_creds(context, creds, client, ccache, - in_tkt_service, 0)); + return(validate_or_renew_creds(context, creds, client, ccache, + in_tkt_service, 0)); } diff --git a/src/lib/krb5/krb/gic_opt.c b/src/lib/krb5/krb/gic_opt.c index a6542a02a..d326ac570 100644 --- a/src/lib/krb5/krb/gic_opt.c +++ b/src/lib/krb5/krb/gic_opt.c @@ -547,4 +547,3 @@ krb5_get_init_creds_opt_get_fast_flags(krb5_context context, *out_flags = opte->opt_private->fast_flags; return retval; } - diff --git a/src/lib/krb5/krb/gic_pwd.c b/src/lib/krb5/krb/gic_pwd.c index eac2afb28..4d2875f34 100644 --- a/src/lib/krb5/krb/gic_pwd.c +++ b/src/lib/krb5/krb/gic_pwd.c @@ -4,16 +4,15 @@ #include "init_creds_ctx.h" krb5_error_code -krb5_get_as_key_password( - krb5_context context, - krb5_principal client, - krb5_enctype etype, - krb5_prompter_fct prompter, - void *prompter_data, - krb5_data *salt, - krb5_data *params, - krb5_keyblock *as_key, - void *gak_data) +krb5_get_as_key_password(krb5_context context, + krb5_principal client, + krb5_enctype etype, + krb5_prompter_fct prompter, + void *prompter_data, + krb5_data *salt, + krb5_data *params, + krb5_keyblock *as_key, + void *gak_data) { krb5_data *password; krb5_error_code ret; diff --git a/src/lib/krb5/krb/mk_priv.c b/src/lib/krb5/krb/mk_priv.c index b3cb29722..dc781b7ab 100644 --- a/src/lib/krb5/krb/mk_priv.c +++ b/src/lib/krb5/krb/mk_priv.c @@ -33,10 +33,10 @@ #include "auth_con.h" static krb5_error_code -krb5_mk_priv_basic(krb5_context context, const krb5_data *userdata, - krb5_key key, krb5_replay_data *replaydata, - krb5_address *local_addr, krb5_address *remote_addr, - krb5_pointer i_vector, krb5_data *outbuf) +mk_priv_basic(krb5_context context, const krb5_data *userdata, + krb5_key key, krb5_replay_data *replaydata, + krb5_address *local_addr, krb5_address *remote_addr, + krb5_pointer i_vector, krb5_data *outbuf) { krb5_enctype enctype = krb5_k_key_enctype(context, key); krb5_error_code retval; @@ -193,9 +193,9 @@ krb5_mk_priv(krb5_context context, krb5_auth_context auth_context, } } - if ((retval = krb5_mk_priv_basic(context, userdata, key, &replaydata, - plocal_fulladdr, premote_fulladdr, - auth_context->i_vector, outbuf))) { + if ((retval = mk_priv_basic(context, userdata, key, &replaydata, + plocal_fulladdr, premote_fulladdr, + auth_context->i_vector, outbuf))) { CLEANUP_DONE(); goto error; } diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index c0f9f833d..17e05c805 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -72,19 +72,19 @@ make_etype_list(krb5_context context, krb5_authdata ***authdata); static krb5_error_code -krb5_generate_authenticator (krb5_context, - krb5_authenticator *, krb5_principal, - krb5_checksum *, krb5_key, - krb5_ui_4, krb5_authdata **, - krb5_authdata_context ad_context, - krb5_enctype *desired_etypes, - krb5_enctype tkt_enctype); +generate_authenticator(krb5_context, + krb5_authenticator *, krb5_principal, + krb5_checksum *, krb5_key, + krb5_ui_4, krb5_authdata **, + krb5_authdata_context ad_context, + krb5_enctype *desired_etypes, + krb5_enctype tkt_enctype); krb5_error_code -krb5int_generate_and_save_subkey (krb5_context context, - krb5_auth_context auth_context, - krb5_keyblock *keyblock, - krb5_enctype enctype) +krb5int_generate_and_save_subkey(krb5_context context, + krb5_auth_context auth_context, + krb5_keyblock *keyblock, + krb5_enctype enctype) { /* Provide some more fodder for random number code. This isn't strong cryptographically; the point here is not @@ -242,15 +242,15 @@ krb5_mk_req_extended(krb5_context context, krb5_auth_context *auth_context, desired_etypes = (*auth_context)->permitted_etypes; } - if ((retval = krb5_generate_authenticator(context, - (*auth_context)->authentp, - in_creds->client, checksump, - (*auth_context)->send_subkey, - (*auth_context)->local_seq_number, - in_creds->authdata, - (*auth_context)->ad_context, - desired_etypes, - in_creds->keyblock.enctype))) + if ((retval = generate_authenticator(context, + (*auth_context)->authentp, + in_creds->client, checksump, + (*auth_context)->send_subkey, + (*auth_context)->local_seq_number, + in_creds->authdata, + (*auth_context)->ad_context, + desired_etypes, + in_creds->keyblock.enctype))) goto cleanup_cksum; /* encode the authenticator */ @@ -301,13 +301,13 @@ cleanup: } static krb5_error_code -krb5_generate_authenticator(krb5_context context, krb5_authenticator *authent, - krb5_principal client, krb5_checksum *cksum, - krb5_key key, krb5_ui_4 seq_number, - krb5_authdata **authorization, - krb5_authdata_context ad_context, - krb5_enctype *desired_etypes, - krb5_enctype tkt_enctype) +generate_authenticator(krb5_context context, krb5_authenticator *authent, + krb5_principal client, krb5_checksum *cksum, + krb5_key key, krb5_ui_4 seq_number, + krb5_authdata **authorization, + krb5_authdata_context ad_context, + krb5_enctype *desired_etypes, + krb5_enctype tkt_enctype) { krb5_error_code retval; krb5_authdata **ext_authdata = NULL; diff --git a/src/lib/krb5/krb/pr_to_salt.c b/src/lib/krb5/krb/pr_to_salt.c index 5d57bc599..505c56805 100644 --- a/src/lib/krb5/krb/pr_to_salt.c +++ b/src/lib/krb5/krb/pr_to_salt.c @@ -30,14 +30,17 @@ #include "k5-int.h" -static krb5_error_code krb5_principal2salt_internal -(krb5_context, krb5_const_principal, krb5_data *ret, int); +static krb5_error_code +principal2salt_internal(krb5_context, krb5_const_principal, + krb5_data *ret, int); /* * Convert a krb5_principal into the default salt for that principal. */ static krb5_error_code -krb5_principal2salt_internal(krb5_context context, register krb5_const_principal pr, krb5_data *ret, int use_realm) +principal2salt_internal(krb5_context context, + register krb5_const_principal pr, + krb5_data *ret, int use_realm) { unsigned int size = 0, offset=0; krb5_int32 nelem; @@ -75,13 +78,15 @@ krb5_principal2salt_internal(krb5_context context, register krb5_const_principal } krb5_error_code -krb5_principal2salt(krb5_context context, register krb5_const_principal pr, krb5_data *ret) +krb5_principal2salt(krb5_context context, + register krb5_const_principal pr, krb5_data *ret) { - return krb5_principal2salt_internal(context, pr, ret, 1); + return principal2salt_internal(context, pr, ret, 1); } krb5_error_code -krb5_principal2salt_norealm(krb5_context context, register krb5_const_principal pr, krb5_data *ret) +krb5_principal2salt_norealm(krb5_context context, + register krb5_const_principal pr, krb5_data *ret) { - return krb5_principal2salt_internal(context, pr, ret, 0); + return principal2salt_internal(context, pr, ret, 0); } -- 2.26.2