Home | History | Annotate | Line # | Download | only in krb5
      1 /*	$NetBSD: db_plugin.c,v 1.2 2017/01/28 21:31:49 christos Exp $	*/
      2 
      3 /*
      4  */
      5 
      6 #include "krb5_locl.h"
      7 #include "db_plugin.h"
      8 
      9 /* Default plugin (DB using binary search of sorted text file) follows */
     10 static heim_base_once_t db_plugins_once = HEIM_BASE_ONCE_INIT;
     11 
     12 static krb5_error_code KRB5_LIB_CALL
     13 db_plugins_plcallback(krb5_context context, const void *plug, void *plugctx,
     14 		      void *userctx)
     15 {
     16     return 0;
     17 }
     18 
     19 static void
     20 db_plugins_init(void *arg)
     21 {
     22     krb5_context context = arg;
     23     (void)_krb5_plugin_run_f(context, "krb5", KRB5_PLUGIN_DB,
     24 			     KRB5_PLUGIN_DB_VERSION_0, 0, NULL,
     25 			     db_plugins_plcallback);
     26 }
     27 
     28 KRB5_LIB_FUNCTION void KRB5_LIB_CALL
     29 _krb5_load_db_plugins(krb5_context context)
     30 {
     31     heim_base_once_f(&db_plugins_once, context, db_plugins_init);
     32 }
     33 
     34