From e3e29f93dddce19f92f2ee3985a0dcd0a9296ed8 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Fri, 30 Jun 1995 20:14:39 +0000 Subject: [PATCH] Add kdb dispatch table for changing between Berkeley and DBM git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6205 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/ChangeLog | 4 ++++ src/include/krb5/kdb.h | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog index 6da1a8cc4..c585d6e6b 100644 --- a/src/include/krb5/ChangeLog +++ b/src/include/krb5/ChangeLog @@ -1,4 +1,8 @@ +Fri Jun 30 16:13:41 EDT 1995 Paul Park (pjpark@mit.edu) + * kdb.h - Add kdb dispatch table and set routine under KDB5_DISPATCH. + + Tue Jun 27 16:12:09 EDT 1995 Paul Park (pjpark@mit.edu) * adm_proto.h - Change second argument of aprof_get... routines to be const char *. diff --git a/src/include/krb5/kdb.h b/src/include/krb5/kdb.h index d5c00682f..8f1ebfdf2 100644 --- a/src/include/krb5/kdb.h +++ b/src/include/krb5/kdb.h @@ -200,5 +200,32 @@ krb5_error_code krb5_db_fetch_mkey #define KRB5_KDB_DEF_FLAGS 0 +#ifdef KDB5_DISPATCH +/* + * Database operation dispatch table. This table determines the procedures + * to be used to access the KDC database. Replacement of this structure is + * not supported. + */ +typedef struct _kdb5_dispatch_table { + char * kdb5_db_mech_name; + char * kdb5_db_index_ext; + char * kdb5_db_data_ext; + char * kdb5_db_lock_ext; + DBM * (*kdb5_dbm_open) KRB5_NPROTOTYPE((char *, int, int)); + void (*kdb5_dbm_close) KRB5_NPROTOTYPE((DBM *)); + datum (*kdb5_dbm_fetch) KRB5_NPROTOTYPE((DBM *, datum)); + datum (*kdb5_dbm_firstkey) KRB5_NPROTOTYPE((DBM *)); + datum (*kdb5_dbm_nextkey) KRB5_NPROTOTYPE((DBM *)); + int (*kdb5_dbm_delete) KRB5_NPROTOTYPE((DBM *, datum)); + int (*kdb5_dbm_store) KRB5_NPROTOTYPE((DBM *, datum, datum, int)); + int (*kdb5_dbm_error) KRB5_NPROTOTYPE((DBM *)); + int (*kdb5_dbm_clearerr) KRB5_NPROTOTYPE((DBM *)); + int (*kdb5_dbm_dirfno) KRB5_NPROTOTYPE((DBM *)); + int (*kdb5_dbm_pagfno) KRB5_NPROTOTYPE((DBM *)); +} kdb5_dispatch_table; + +krb5_error_code kdb5_db_set_dbops KRB5_PROTOTYPE((krb5_context, + kdb5_dispatch_table *)); +#endif /* KDB5_DISPATCH */ #endif /* KRB5_KDB5__ */ -- 2.26.2