From 3037de2820a0f4eaa4293a1dab7dcf3fde3bf92b Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Mar 01 2021 15:44:25 +0000 Subject: 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 --- diff --git a/daemons/ipa-kdb/ipa_kdb_certauth.c b/daemons/ipa-kdb/ipa_kdb_certauth.c index bc6b265..3a3060c 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 }; @@ -354,12 +357,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); } } @@ -404,12 +407,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);