From 592a0eceb7e38fb41c815efa22229574bae177c6 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Wed, 24 Feb 2021 20:52:15 +0200 Subject: [PATCH] ipa-kdb: reformat ipa_kdb_certauth Add prototype to the exported function Replace few tabs by spaces and mark static code as static. Signed-off-by: Alexander Bokovoy Reviewed-By: Robbie Harwood Reviewed-By: Rob Crittenden Reviewed-By: Florence Blanc-Renaud --- daemons/ipa-kdb/ipa_kdb_certauth.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/daemons/ipa-kdb/ipa_kdb_certauth.c b/daemons/ipa-kdb/ipa_kdb_certauth.c index 47911aa3ded56efe4d47acb78d94ccdbcdca7339..32d6710edb9f1547d1ffe628a5529357b2f593ab 100644 --- a/daemons/ipa-kdb/ipa_kdb_certauth.c +++ b/daemons/ipa-kdb/ipa_kdb_certauth.c @@ -71,10 +71,13 @@ struct krb5_certauth_moddata_st { time_t valid_until; }; -void ipa_certmap_debug(void *private, - const char *file, long line, - const char *function, - const char *format, ...) +krb5_error_code certauth_ipakdb_initvt(krb5_context context, + int maj_ver, int min_ver, + krb5_plugin_vtable vtable); + +static void ipa_certmap_debug(void *private, const char *file, long line, + const char *function, + const char *format, ...) { va_list ap; char str[255] = { 0 }; @@ -355,12 +358,12 @@ static krb5_error_code ipa_certauth_authorize(krb5_context context, * so there is nothing more to add here. */ auth_inds = calloc(2, sizeof(char *)); if (auth_inds != NULL) { - ret = asprintf(&auth_inds[0], "pkinit"); - if (ret != -1) { + ret = asprintf(&auth_inds[0], "pkinit"); + if (ret != -1) { auth_inds[1] = NULL; *authinds_out = auth_inds; - } else { - free(auth_inds); + } else { + free(auth_inds); } } @@ -405,12 +408,12 @@ static void ipa_certauth_free_indicator(krb5_context context, size_t i = 0; if ((authinds == NULL) || (moddata == NULL)) { - return; + return; } for(i=0; authinds[i]; i++) { - free(authinds[i]); - authinds[i] = NULL; + free(authinds[i]); + authinds[i] = NULL; } free(authinds); -- 2.26.3