From fbdcf2663b56007a438ac4f0d8d82436b1bfe688 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 11 Jul 2006 18:01:26 +0000 Subject: r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8) --- source3/include/idmap.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'source3/include/idmap.h') diff --git a/source3/include/idmap.h b/source3/include/idmap.h index 474982f292..ee248ef26f 100644 --- a/source3/include/idmap.h +++ b/source3/include/idmap.h @@ -24,32 +24,32 @@ Boston, MA 02111-1307, USA. */ -/* idmap version determines auto-conversion */ -#define IDMAP_VERSION 2 +/* idmap version determines auto-conversion - this is the database + structure version specifier. */ -#define SMB_IDMAP_INTERFACE_VERSION 2 +#define IDMAP_VERSION 2 +/* The interface version specifier. + Updated to 3 for enum types by JRA. */ -#define ID_EMPTY 0x00 -#define ID_USERID 0x01 -#define ID_GROUPID 0x02 -#define ID_OTHER 0x04 +#define SMB_IDMAP_INTERFACE_VERSION 3 -#define ID_TYPEMASK 0x0f +enum idmap_type { ID_USERID, ID_GROUPID }; -#define ID_QUERY_ONLY 0x10 -#define ID_CACHE_ONLY 0x20 +#define IDMAP_FLAG_NONE 0x0 +#define IDMAP_FLAG_QUERY_ONLY 0x1 /* Don't ever allocate, just query. */ +#define IDMAP_FLAG_CACHE_ONLY 0x2 /* Only look in our local cache, not remote. */ /* Filled out by IDMAP backends */ struct idmap_methods { /* Called when backend is first loaded */ - NTSTATUS (*init)( char *params ); + NTSTATUS (*init)( const char *params ); - NTSTATUS (*allocate_id)(unid_t *id, int id_type); - NTSTATUS (*get_sid_from_id)(DOM_SID *sid, unid_t id, int id_type); - NTSTATUS (*get_id_from_sid)(unid_t *id, int *id_type, const DOM_SID *sid); - NTSTATUS (*set_mapping)(const DOM_SID *sid, unid_t id, int id_type); + NTSTATUS (*allocate_id)(unid_t *id, enum idmap_type id_type); + NTSTATUS (*get_sid_from_id)(DOM_SID *sid, unid_t id, enum idmap_type id_type, int flags); + NTSTATUS (*get_id_from_sid)(unid_t *id, enum idmap_type *id_type, const DOM_SID *sid, int flags); + NTSTATUS (*set_mapping)(const DOM_SID *sid, unid_t id, enum idmap_type id_type); /* Called when backend is unloaded */ NTSTATUS (*close_fn)(void); -- cgit