6 #include <windc_plugin.h>
9 windc_init(krb5_context context
, void **ctx
)
11 krb5_warnx(context
, "windc init");
21 static krb5_error_code
22 pac_generate(void *ctx
, krb5_context context
,
23 struct hdb_entry_ex
*client
, krb5_pac
*pac
)
28 krb5_warnx(context
, "pac generate");
30 data
.data
= "\x00\x01";
33 ret
= krb5_pac_init(context
, pac
);
37 ret
= krb5_pac_add_buffer(context
, *pac
, 1, &data
);
44 static krb5_error_code
45 pac_verify(void *ctx
, krb5_context context
,
46 const krb5_principal new_ticket_client
,
47 const krb5_principal delegation_proxy
,
48 struct hdb_entry_ex
* client
,
49 struct hdb_entry_ex
* server
,
50 struct hdb_entry_ex
* krbtgt
,
56 krb5_warnx(context
, "pac_verify");
58 ret
= krb5_pac_get_buffer(context
, *pac
, 1, &data
);
62 krb5_data_free(&data
);
67 static krb5_error_code
68 client_access(void *ctx
,
70 krb5_kdc_configuration
*config
,
71 hdb_entry_ex
*client
, const char *client_name
,
72 hdb_entry_ex
*server
, const char *server_name
,
76 krb5_warnx(context
, "client_access");
80 static krb5plugin_windc_ftable windc
= {
81 KRB5_WINDC_PLUGING_MINOR
,
89 static const krb5plugin_windc_ftable
*const windc_plugins
[] = {
94 windc_plugin_load(krb5_context context
,
95 krb5_get_instance_func_t
*get_instance
,
97 const krb5plugin_windc_ftable
*const **plugins
);
100 windc_get_instance(const char *libname
)
102 if (strcmp(libname
, "hdb") == 0)
103 return hdb_get_instance(libname
);
104 else if (strcmp(libname
, "krb5") == 0)
105 return krb5_get_instance(libname
);
111 windc_plugin_load(krb5_context context
,
112 krb5_get_instance_func_t
*get_instance
,
114 const krb5plugin_windc_ftable
*const **plugins
)
116 *get_instance
= windc_get_instance
;
117 *num_plugins
= sizeof(windc_plugins
) / sizeof(windc_plugins
[0]);
118 *plugins
= windc_plugins
;