summaryrefslogtreecommitdiff
path: root/source3/include/idmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/idmap.h')
-rw-r--r--source3/include/idmap.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/source3/include/idmap.h b/source3/include/idmap.h
index 1e56519453..ae7e4e5101 100644
--- a/source3/include/idmap.h
+++ b/source3/include/idmap.h
@@ -1,3 +1,5 @@
+#ifndef _IDMAP_H_
+#define _IDMAP_H_
/*
Unix SMB/CIFS implementation.
@@ -22,6 +24,9 @@
Boston, MA 02111-1307, USA.
*/
+#define SMB_IDMAP_INTERFACE_VERSION 2
+
+
#define ID_EMPTY 0x00
#define ID_USERID 0x01
#define ID_GROUPID 0x02
@@ -29,20 +34,16 @@
#define ID_TYPEMASK 0x0f
-#define ID_NOMAP 0x10
-#define ID_CACHE 0x20
-
-typedef union unid_t {
- uid_t uid;
- gid_t gid;
-} unid_t;
+#define ID_QUERY_ONLY 0x10
/* Filled out by IDMAP backends */
struct idmap_methods {
/* Called when backend is first loaded */
- NTSTATUS (*init)(void);
+ NTSTATUS (*init)( char *params );
+ NTSTATUS (*allocate_rid)(uint32 *rid, int rid_type);
+ 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);
@@ -53,4 +54,4 @@ struct idmap_methods {
/* Called to dump backend status */
void (*status)(void);
};
-
+#endif /* _IDMAP_H_ */