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