5 #include <windc_plugin.h>
8 windc_init(krb5_context context, void **ctx)
10 krb5_warnx(context, "windc init");
20 static krb5_error_code
21 pac_generate(void *ctx, krb5_context context,
22 struct hdb_entry_ex *client, krb5_pac *pac)
27 krb5_warnx(context, "pac generate");
29 data.data = "\x00\x01";
32 ret = krb5_pac_init(context, pac);
36 ret = krb5_pac_add_buffer(context, *pac, 1, &data);
43 static krb5_error_code
44 pac_verify(void *ctx, krb5_context context,
45 const krb5_principal new_ticket_client,
46 const krb5_principal delegation_proxy,
47 struct hdb_entry_ex * client,
48 struct hdb_entry_ex * server,
49 struct hdb_entry_ex * krbtgt,
55 krb5_warnx(context, "pac_verify");
57 ret = krb5_pac_get_buffer(context, *pac, 1, &data);
61 krb5_data_free(&data);
66 static krb5_error_code
67 client_access(void *ctx,
69 krb5_kdc_configuration *config,
70 hdb_entry_ex *client, const char *client_name,
71 hdb_entry_ex *server, const char *server_name,
75 krb5_warnx(context, "client_access");
79 static krb5plugin_windc_ftable windc = {
80 KRB5_WINDC_PLUGING_MINOR,
88 static const krb5plugin_windc_ftable *const windc_plugins[] = {
93 windc_plugin_load(krb5_context context,
94 krb5_get_instance_func_t *get_instance,
96 const krb5plugin_windc_ftable *const **plugins);
99 windc_get_instance(const char *libname)
101 if (strcmp(libname, "kdc") == 0)
102 return kdc_get_instance(libname);
103 else if (strcmp(libname, "hdb") == 0)
104 return hdb_get_instance(libname);
105 else if (strcmp(libname, "krb5") == 0)
106 return krb5_get_instance(libname);
112 windc_plugin_load(krb5_context context,
113 krb5_get_instance_func_t *get_instance,
115 const krb5plugin_windc_ftable *const **plugins)
117 *get_instance = windc_get_instance;
118 *num_plugins = sizeof(windc_plugins) / sizeof(windc_plugins[0]);
119 *plugins = windc_plugins;