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 <abokovoy@redhat.com>
Reviewed-By: Robbie Harwood <rharwood@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Alexander Bokovoy authored and Rob Crittenden committed 2021-03-01 10:44:25 -05:00
1 parent f996c21edb
commit 3037de2820
1 file changed
+14 -11
+14 -11
View File
@@ -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);