kdc: rename windc to kdc plugin

Rename the "windc" plugin API to the more general "kdc" plugin API, for two
reasons: the Heimdal KDC uses the Windows PAC even when not emulating a domain
controller, and the plugin API has accreted methods that are not specific to
emulating a domain controller (such as referral_policy and finalize_reply).
This commit is contained in:
Luke Howard
2022-01-03 11:10:18 +11:00
parent a4c6b81ce9
commit fcff5933ad
13 changed files with 90 additions and 90 deletions

View File

@@ -29,10 +29,10 @@ krb5.conf: krb5.conf.in Makefile
$(do_subst) < $(srcdir)/krb5.conf.in > krb5.conf.tmp
mv krb5.conf.tmp krb5.conf
lib_LTLIBRARIES = windc.la
lib_LTLIBRARIES = kdc_test_plugin.la
windc_la_SOURCES = windc.c
windc_la_LDFLAGS = -module
kdc_test_plugin_la_SOURCES = kdc_test_plugin.c
kdc_test_plugin_la_LDFLAGS = -module
CLEANFILES= \
$(TESTS) \

View File

@@ -115,8 +115,8 @@ trap "kill ${kdcpid}; echo signal killing kdc; exit 1;" EXIT
ec=0
echo "Check that WINDC module was loaded "
grep "windc init" messages.log >/dev/null || \
echo "Check that KDC plugin module was loaded "
grep "kdc plugin init" messages.log >/dev/null || \
{ ec=1 ; eval "${testfailed}"; }
echo "Getting client initial tickets"; > messages.log

View File

@@ -3,18 +3,18 @@
#include <hdb.h>
#include <hx509.h>
#include <kdc.h>
#include <windc_plugin.h>
#include <kdc-plugin.h>
static krb5_error_code KRB5_CALLCONV
windc_init(krb5_context context, void **ctx)
init(krb5_context context, void **ctx)
{
krb5_warnx(context, "windc init");
krb5_warnx(context, "kdc plugin init");
*ctx = NULL;
return 0;
}
static void KRB5_CALLCONV
windc_fini(void *ctx)
fini(void *ctx)
{
}
@@ -123,10 +123,10 @@ audit(void *ctx, astgs_request_t r)
return 0;
}
static krb5plugin_windc_ftable windc = {
KRB5_WINDC_PLUGING_MINOR,
windc_init,
windc_fini,
static krb5plugin_kdc_ftable kdc_plugin = {
KRB5_KDC_PLUGING_MINOR,
init,
fini,
pac_generate,
pac_verify,
client_access,
@@ -135,18 +135,18 @@ static krb5plugin_windc_ftable windc = {
audit
};
static const krb5plugin_windc_ftable *const windc_plugins[] = {
&windc
static const krb5plugin_kdc_ftable *const kdc_plugins[] = {
&kdc_plugin
};
krb5_error_code KRB5_CALLCONV
windc_plugin_load(krb5_context context,
krb5_get_instance_func_t *get_instance,
size_t *num_plugins,
const krb5plugin_windc_ftable *const **plugins);
kdc_plugin_load(krb5_context context,
krb5_get_instance_func_t *get_instance,
size_t *num_plugins,
const krb5plugin_kdc_ftable *const **plugins);
static uintptr_t KRB5_CALLCONV
windc_get_instance(const char *libname)
kdc_plugin_get_instance(const char *libname)
{
if (strcmp(libname, "hdb") == 0)
return hdb_get_instance(libname);
@@ -157,14 +157,14 @@ windc_get_instance(const char *libname)
}
krb5_error_code KRB5_CALLCONV
windc_plugin_load(krb5_context context,
krb5_get_instance_func_t *get_instance,
size_t *num_plugins,
const krb5plugin_windc_ftable *const **plugins)
kdc_plugin_load(krb5_context context,
krb5_get_instance_func_t *get_instance,
size_t *num_plugins,
const krb5plugin_kdc_ftable *const **plugins)
{
*get_instance = windc_get_instance;
*num_plugins = sizeof(windc_plugins) / sizeof(windc_plugins[0]);
*plugins = windc_plugins;
*get_instance = kdc_plugin_get_instance;
*num_plugins = sizeof(kdc_plugins) / sizeof(kdc_plugins[0]);
*plugins = kdc_plugins;
return 0;
}