document
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24973 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
104
lib/hdb/hdb.h
104
lib/hdb/hdb.h
@@ -85,49 +85,63 @@ typedef struct HDB{
|
|||||||
* Then done the caller should call hdb_close(), and to release
|
* Then done the caller should call hdb_close(), and to release
|
||||||
* all resources hdb_destroy().
|
* all resources hdb_destroy().
|
||||||
*/
|
*/
|
||||||
krb5_error_code (*hdb_open)(krb5_context,
|
krb5_error_code (*hdb_open)(krb5_context, struct HDB*, int, mode_t);
|
||||||
struct HDB*,
|
|
||||||
int,
|
|
||||||
mode_t);
|
|
||||||
/**
|
/**
|
||||||
* Close the database for transaction
|
* Close the database for transaction
|
||||||
*
|
*
|
||||||
* Closes the database for further transactions, wont release any
|
* Closes the database for further transactions, wont release any
|
||||||
* permanant resources. the database can be ->hdb_open-ed again.
|
* permanant resources. the database can be ->hdb_open-ed again.
|
||||||
*/
|
*/
|
||||||
krb5_error_code (*hdb_close)(krb5_context,
|
krb5_error_code (*hdb_close)(krb5_context, struct HDB*);
|
||||||
struct HDB*);
|
/**
|
||||||
void (*hdb_free)(krb5_context,
|
* Free an entry after use.
|
||||||
struct HDB*,
|
*/
|
||||||
|
void (*hdb_free)(krb5_context, struct HDB*, hdb_entry_ex*);
|
||||||
|
/**
|
||||||
|
* Fetch an entry from the backend
|
||||||
|
*
|
||||||
|
* Fetch an entry from the backend, flags are what type of entry
|
||||||
|
* should be fetch: client, server, krbtgt.
|
||||||
|
*/
|
||||||
|
krb5_error_code (*hdb_fetch)(krb5_context, struct HDB*,
|
||||||
|
krb5_const_principal, unsigned,
|
||||||
hdb_entry_ex*);
|
hdb_entry_ex*);
|
||||||
krb5_error_code (*hdb_fetch)(krb5_context,
|
/**
|
||||||
struct HDB*,
|
* Store an entry to database
|
||||||
krb5_const_principal,
|
*/
|
||||||
unsigned,
|
krb5_error_code (*hdb_store)(krb5_context, struct HDB*,
|
||||||
hdb_entry_ex*);
|
unsigned, hdb_entry_ex*);
|
||||||
krb5_error_code (*hdb_store)(krb5_context,
|
/**
|
||||||
struct HDB*,
|
* Remove an entry from the database.
|
||||||
unsigned,
|
*/
|
||||||
hdb_entry_ex*);
|
krb5_error_code (*hdb_remove)(krb5_context, struct HDB*,
|
||||||
krb5_error_code (*hdb_remove)(krb5_context,
|
|
||||||
struct HDB*,
|
|
||||||
krb5_const_principal);
|
krb5_const_principal);
|
||||||
krb5_error_code (*hdb_firstkey)(krb5_context,
|
/**
|
||||||
struct HDB*,
|
* As part of iteration, fetch one entry
|
||||||
unsigned,
|
*/
|
||||||
hdb_entry_ex*);
|
krb5_error_code (*hdb_firstkey)(krb5_context, struct HDB*,
|
||||||
krb5_error_code (*hdb_nextkey)(krb5_context,
|
unsigned, hdb_entry_ex*);
|
||||||
struct HDB*,
|
/**
|
||||||
unsigned,
|
* As part of iteration, fetch next entry
|
||||||
hdb_entry_ex*);
|
*/
|
||||||
krb5_error_code (*hdb_lock)(krb5_context,
|
krb5_error_code (*hdb_nextkey)(krb5_context, struct HDB*,
|
||||||
struct HDB*,
|
unsigned, hdb_entry_ex*);
|
||||||
int operation);
|
/**
|
||||||
krb5_error_code (*hdb_unlock)(krb5_context,
|
* Lock database
|
||||||
struct HDB*);
|
*
|
||||||
krb5_error_code (*hdb_rename)(krb5_context,
|
* A lock can only be held by one consumers. Transaction can still
|
||||||
struct HDB*,
|
* happen on the database while the lock is held, so the entry is
|
||||||
const char*);
|
* only useful for syncroning creation of the database and renaming of the database.
|
||||||
|
*/
|
||||||
|
krb5_error_code (*hdb_lock)(krb5_context, struct HDB*, int);
|
||||||
|
/**
|
||||||
|
* Unlock database
|
||||||
|
*/
|
||||||
|
krb5_error_code (*hdb_unlock)(krb5_context, struct HDB*);
|
||||||
|
/**
|
||||||
|
* Rename the data base.
|
||||||
|
*/
|
||||||
|
krb5_error_code (*hdb_rename)(krb5_context, struct HDB*, const char*);
|
||||||
/**
|
/**
|
||||||
* Get a encoded principal from database.
|
* Get a encoded principal from database.
|
||||||
*
|
*
|
||||||
@@ -135,18 +149,11 @@ typedef struct HDB{
|
|||||||
* principal key and return all data related to principal. The
|
* principal key and return all data related to principal. The
|
||||||
* encoded entry is of type hdb_entry or hdb_entry_alias.
|
* encoded entry is of type hdb_entry or hdb_entry_alias.
|
||||||
*/
|
*/
|
||||||
krb5_error_code (*hdb__get)(krb5_context,
|
krb5_error_code (*hdb__get)(krb5_context, struct HDB*,
|
||||||
struct HDB*,
|
krb5_data, krb5_data*);
|
||||||
krb5_data,
|
krb5_error_code (*hdb__put)(krb5_context, struct HDB*, int,
|
||||||
krb5_data*);
|
krb5_data, krb5_data);
|
||||||
krb5_error_code (*hdb__put)(krb5_context,
|
krb5_error_code (*hdb__del)(krb5_context, struct HDB*, krb5_data);
|
||||||
struct HDB*,
|
|
||||||
int,
|
|
||||||
krb5_data,
|
|
||||||
krb5_data);
|
|
||||||
krb5_error_code (*hdb__del)(krb5_context,
|
|
||||||
struct HDB*,
|
|
||||||
krb5_data);
|
|
||||||
/**
|
/**
|
||||||
* Destroy the handle to the database.
|
* Destroy the handle to the database.
|
||||||
*
|
*
|
||||||
@@ -155,8 +162,7 @@ typedef struct HDB{
|
|||||||
* logical reverse of hdb_create() function that is the entry
|
* logical reverse of hdb_create() function that is the entry
|
||||||
* point for the module.
|
* point for the module.
|
||||||
*/
|
*/
|
||||||
krb5_error_code (*hdb_destroy)(krb5_context,
|
krb5_error_code (*hdb_destroy)(krb5_context, struct HDB*);
|
||||||
struct HDB*);
|
|
||||||
}HDB;
|
}HDB;
|
||||||
|
|
||||||
#define HDB_INTERFACE_VERSION 4
|
#define HDB_INTERFACE_VERSION 4
|
||||||
|
Reference in New Issue
Block a user