diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-05-07 04:51:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:39 -0500 |
commit | 835926c87921a0f4186a9331b6e31b2e6f1c0d90 (patch) | |
tree | 1086d806019f4f7a86dc7b0073017a0fb876b6c2 /source4/heimdal/lib/hdb/hdb.h | |
parent | 7a0b65efce3669643d21a2e209d4bf2626a5e948 (diff) | |
download | samba-835926c87921a0f4186a9331b6e31b2e6f1c0d90.tar.gz samba-835926c87921a0f4186a9331b6e31b2e6f1c0d90.tar.bz2 samba-835926c87921a0f4186a9331b6e31b2e6f1c0d90.zip |
r15481: Update heimdal/ to match current lorikeet-heimdal.
This includes many useful upstream changes, many of which should
reduce warnings in our compile.
It also includes a change to the HDB interface, which removes the need
for Samba4/lorikeet-heimdal to deviate from upstream for hdb_fetch().
The new flags replace the old entry type enum.
(This required the rework in hdb-ldb.c included in this commit)
Andrew Bartlett
(This used to be commit ef5604b87744c89e66e4d845f45b23563754ec05)
Diffstat (limited to 'source4/heimdal/lib/hdb/hdb.h')
-rw-r--r-- | source4/heimdal/lib/hdb/hdb.h | 86 |
1 files changed, 59 insertions, 27 deletions
diff --git a/source4/heimdal/lib/hdb/hdb.h b/source4/heimdal/lib/hdb/hdb.h index 463cbf71f2..d14eea7ddc 100644 --- a/source4/heimdal/lib/hdb/hdb.h +++ b/source4/heimdal/lib/hdb/hdb.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -/* $Id: hdb.h,v 1.36 2005/12/12 12:35:36 lha Exp $ */ +/* $Id: hdb.h,v 1.38 2006/04/28 07:37:11 lha Exp $ */ #ifndef __HDB_H__ #define __HDB_H__ @@ -44,14 +44,16 @@ enum hdb_lockop{ HDB_RLOCK, HDB_WLOCK }; /* flags for various functions */ -#define HDB_F_DECRYPT 1 /* decrypt keys */ -#define HDB_F_REPLACE 2 /* replace entry */ +#define HDB_F_DECRYPT 1 /* decrypt keys */ +#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 */ #define HDB_KU_MKEY 0x484442 -enum hdb_ent_type{ HDB_ENT_TYPE_CLIENT, HDB_ENT_TYPE_SERVER, HDB_ENT_TYPE_ANY }; - typedef struct hdb_master_key_data *hdb_master_key; typedef struct hdb_entry_ex { @@ -87,30 +89,60 @@ typedef struct HDB{ hdb_master_key hdb_master_key; void *hdb_openp; - krb5_error_code (*hdb_open)(krb5_context, struct HDB*, int, mode_t); - krb5_error_code (*hdb_close)(krb5_context, struct HDB*); - void (*hdb_free)(krb5_context,struct HDB*,hdb_entry_ex*); - krb5_error_code (*hdb_fetch)(krb5_context,struct HDB*,unsigned hdb_flags, - krb5_const_principal principal, - enum hdb_ent_type ent_type, hdb_entry_ex*); - krb5_error_code (*hdb_store)(krb5_context,struct HDB*, - unsigned,hdb_entry_ex*); - krb5_error_code (*hdb_remove)(krb5_context, struct HDB*, hdb_entry_ex*); - 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*); + krb5_error_code (*hdb_open)(krb5_context, + struct HDB*, + int, + mode_t); + krb5_error_code (*hdb_close)(krb5_context, + struct HDB*); + void (*hdb_free)(krb5_context, + struct HDB*, + hdb_entry_ex*); + krb5_error_code (*hdb_fetch)(krb5_context, + struct HDB*, + krb5_const_principal, + unsigned, + hdb_entry_ex*); + krb5_error_code (*hdb_store)(krb5_context, + struct HDB*, + unsigned, + hdb_entry_ex*); + krb5_error_code (*hdb_remove)(krb5_context, + 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; -#define HDB_INTERFACE_VERSION 3 +#define HDB_INTERFACE_VERSION 4 struct hdb_so_method { int version; |