Break out the that we request from principal from the entry and pass
it in as a seprate argument. Add more flags to ->hdb_get(). Re-indent. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17305 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -44,8 +44,12 @@
|
|||||||
enum hdb_lockop{ HDB_RLOCK, HDB_WLOCK };
|
enum hdb_lockop{ HDB_RLOCK, HDB_WLOCK };
|
||||||
|
|
||||||
/* flags for various functions */
|
/* flags for various functions */
|
||||||
#define HDB_F_DECRYPT 1 /* decrypt keys */
|
#define HDB_F_DECRYPT 1 /* decrypt keys */
|
||||||
#define HDB_F_REPLACE 2 /* replace entry */
|
#define HDB_F_REPLACE 2 /* replace entry */
|
||||||
|
#define HDB_F_GET_CLIENT 4 /* fetch client */
|
||||||
|
#define HDB_F_GET_SERVER 8 /* fetch server */
|
||||||
|
#define HDB_F_GET_KRBTGT 16 /* fetch krbtgt */
|
||||||
|
#define HDB_F_GET_ANY 28 /* fetch any of client,server,krbtgt */
|
||||||
|
|
||||||
/* key usage for master key */
|
/* key usage for master key */
|
||||||
#define HDB_KU_MKEY 0x484442
|
#define HDB_KU_MKEY 0x484442
|
||||||
@@ -67,26 +71,57 @@ typedef struct HDB{
|
|||||||
hdb_master_key hdb_master_key;
|
hdb_master_key hdb_master_key;
|
||||||
int hdb_openp;
|
int hdb_openp;
|
||||||
|
|
||||||
krb5_error_code (*hdb_open)(krb5_context, struct HDB*, int, mode_t);
|
krb5_error_code (*hdb_open)(krb5_context,
|
||||||
krb5_error_code (*hdb_close)(krb5_context, struct HDB*);
|
struct HDB*,
|
||||||
void (*hdb_free)(krb5_context,struct HDB*,hdb_entry_ex*);
|
int,
|
||||||
krb5_error_code (*hdb_fetch)(krb5_context,struct HDB*,
|
mode_t);
|
||||||
unsigned,hdb_entry_ex*);
|
krb5_error_code (*hdb_close)(krb5_context,
|
||||||
krb5_error_code (*hdb_store)(krb5_context,struct HDB*,
|
struct HDB*);
|
||||||
unsigned,hdb_entry_ex*);
|
void (*hdb_free)(krb5_context,
|
||||||
krb5_error_code (*hdb_remove)(krb5_context, struct HDB*, hdb_entry_ex*);
|
struct HDB*,
|
||||||
krb5_error_code (*hdb_firstkey)(krb5_context, struct HDB*,
|
hdb_entry_ex*);
|
||||||
unsigned, hdb_entry_ex*);
|
krb5_error_code (*hdb_fetch)(krb5_context,
|
||||||
krb5_error_code (*hdb_nextkey)(krb5_context, struct HDB*,
|
struct HDB*,
|
||||||
unsigned, hdb_entry_ex*);
|
krb5_const_principal,
|
||||||
krb5_error_code (*hdb_lock)(krb5_context, struct HDB*, int operation);
|
unsigned,
|
||||||
krb5_error_code (*hdb_unlock)(krb5_context, struct HDB*);
|
hdb_entry_ex*);
|
||||||
krb5_error_code (*hdb_rename)(krb5_context, struct HDB*, const char*);
|
krb5_error_code (*hdb_store)(krb5_context,
|
||||||
krb5_error_code (*hdb__get)(krb5_context,struct HDB*,krb5_data,krb5_data*);
|
struct HDB*,
|
||||||
krb5_error_code (*hdb__put)(krb5_context, struct HDB*, int,
|
unsigned,
|
||||||
krb5_data, krb5_data);
|
hdb_entry_ex*);
|
||||||
krb5_error_code (*hdb__del)(krb5_context, struct HDB*, krb5_data);
|
krb5_error_code (*hdb_remove)(krb5_context,
|
||||||
krb5_error_code (*hdb_destroy)(krb5_context, struct HDB*);
|
struct HDB*,
|
||||||
|
krb5_const_principal);
|
||||||
|
krb5_error_code (*hdb_firstkey)(krb5_context,
|
||||||
|
struct HDB*,
|
||||||
|
unsigned,
|
||||||
|
hdb_entry_ex*);
|
||||||
|
krb5_error_code (*hdb_nextkey)(krb5_context,
|
||||||
|
struct HDB*,
|
||||||
|
unsigned,
|
||||||
|
hdb_entry_ex*);
|
||||||
|
krb5_error_code (*hdb_lock)(krb5_context,
|
||||||
|
struct HDB*,
|
||||||
|
int operation);
|
||||||
|
krb5_error_code (*hdb_unlock)(krb5_context,
|
||||||
|
struct HDB*);
|
||||||
|
krb5_error_code (*hdb_rename)(krb5_context,
|
||||||
|
struct HDB*,
|
||||||
|
const char*);
|
||||||
|
krb5_error_code (*hdb__get)(krb5_context,
|
||||||
|
struct HDB*,
|
||||||
|
krb5_data,
|
||||||
|
krb5_data*);
|
||||||
|
krb5_error_code (*hdb__put)(krb5_context,
|
||||||
|
struct HDB*,
|
||||||
|
int,
|
||||||
|
krb5_data,
|
||||||
|
krb5_data);
|
||||||
|
krb5_error_code (*hdb__del)(krb5_context,
|
||||||
|
struct HDB*,
|
||||||
|
krb5_data);
|
||||||
|
krb5_error_code (*hdb_destroy)(krb5_context,
|
||||||
|
struct HDB*);
|
||||||
}HDB;
|
}HDB;
|
||||||
|
|
||||||
#define HDB_INTERFACE_VERSION 3
|
#define HDB_INTERFACE_VERSION 3
|
||||||
|
Reference in New Issue
Block a user