diff options
author | Jeremy Allison <jra@samba.org> | 2006-07-11 18:01:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:19:14 -0500 |
commit | fbdcf2663b56007a438ac4f0d8d82436b1bfe688 (patch) | |
tree | 4e42c1f061391cea3d640152fd240682cbf4fd9a /source3/include/idmap.h | |
parent | 5bf62a0c3cc95abe918f3e772bb10e0a90fdce22 (diff) | |
download | samba-fbdcf2663b56007a438ac4f0d8d82436b1bfe688.tar.gz |
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)
Diffstat (limited to 'source3/include/idmap.h')
-rw-r--r-- | source3/include/idmap.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source3/include/idmap.h b/source3/include/idmap.h index 474982f2926..ee248ef26f2 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); |