summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-03-08 17:29:40 +0000
committerSimo Sorce <idra@samba.org>2003-03-08 17:29:40 +0000
commitbebdbcd248ccb3021d0b94f360fc3cf8ba9e90a6 (patch)
tree70163be469d6e943f4507c6588777a76642f47d8 /source3/include
parentad2e7324f0feda2a391a21c06f7515ef2a152b7e (diff)
downloadsamba-bebdbcd248ccb3021d0b94f360fc3cf8ba9e90a6.tar.gz
samba-bebdbcd248ccb3021d0b94f360fc3cf8ba9e90a6.tar.bz2
samba-bebdbcd248ccb3021d0b94f360fc3cf8ba9e90a6.zip
more on idmap
two layers structure with - local tdb cache - remote idmap repository compiles (This used to be commit 8fb4e210bc7564ed491d121c20d598ba0bfbddff)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/idmap.h24
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);