diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/idmap.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/source3/include/idmap.h b/source3/include/idmap.h index 5a1f4fafc3..fd7646a324 100644 --- a/source3/include/idmap.h +++ b/source3/include/idmap.h @@ -22,24 +22,30 @@ Boston, MA 02111-1307, USA. */ -#define ID_EMPTY 0 -#define ID_USERID 1 -#define ID_GROUPID 2 -#define ID_OTHER 3 +#define ID_EMPTY 0x00 +#define ID_USERID 0x01 +#define ID_GROUPID 0x02 +#define ID_OTHER 0x04 -typedef union id_t { +#define ID_TYPEMASK 0x0f + +#define ID_NOMAP 0x10 +#define ID_CACHE 0x20 + +typedef union unid_t { uid_t uid; gid_t gid; -} id_t; +} unid_t; /* Filled out by IDMAP backends */ struct idmap_methods { /* Called when backend is first loaded */ - NTSTATUS (*init)(void); + NTSTATUS (*init)(const char *init_str); - NTSTATUS (*get_sid_from_id)(DOM_SID *sid, id_t id, int id_type); - NTSTATUS (*get_id_from_sid)(id_t *id, int *id_type, DOM_SID *sid); + 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, DOM_SID *sid); + NTSTATUS (*set_mapping)(DOM_SID *sid, unid_t id, int id_type); /* Called when backend is unloaded */ NTSTATUS (*close)(void); |