libtommath: Fix possible integer overflow CVE-2023-36328
[heimdal.git] / lib / krb5 / db_plugin.c
blobe997d3d286cdbd6dc30d96486f7a0f66bc1a7ad3
1 /*
2 */
4 #include "krb5_locl.h"
5 #include "db_plugin.h"
7 /* Default plugin (DB using binary search of sorted text file) follows */
8 static heim_base_once_t db_plugins_once = HEIM_BASE_ONCE_INIT;
10 static krb5_error_code KRB5_LIB_CALL
11 db_plugins_plcallback(krb5_context context, const void *plug, void *plugctx,
12 void *userctx)
14 return 0;
17 static const char *const db_plugin_deps[] = { "krb5", NULL };
19 static const struct heim_plugin_data
20 db_plugin_data = {
21 "krb5",
22 KRB5_PLUGIN_DB,
23 KRB5_PLUGIN_DB_VERSION_0,
24 db_plugin_deps,
25 krb5_get_instance
28 static void
29 db_plugins_init(void *arg)
31 krb5_context context = arg;
32 (void)_krb5_plugin_run_f(context, &db_plugin_data, 0, NULL,
33 db_plugins_plcallback);
36 KRB5_LIB_FUNCTION void KRB5_LIB_CALL
37 _krb5_load_db_plugins(krb5_context context)
39 heim_base_once_f(&db_plugins_once, context, db_plugins_init);