summaryrefslogtreecommitdiffstats
path: root/source3/groupdb/mapping.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-24 02:52:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:39 -0500
commit8761f5dcc4db5c825a600fe25792ec47cb6cbdc7 (patch)
treefc2fce664676dffbd48055a2f274440ef38693a0 /source3/groupdb/mapping.h
parent3e2c696e45b24b0192ab7b1ddaf1dd4d79571609 (diff)
downloadsamba-8761f5dcc4db5c825a600fe25792ec47cb6cbdc7.tar.gz
samba-8761f5dcc4db5c825a600fe25792ec47cb6cbdc7.tar.xz
samba-8761f5dcc4db5c825a600fe25792ec47cb6cbdc7.zip
r18867: change the group mapping code to use ldb instead of tdb
See the discussion of this on the samba-technical list (This used to be commit 4ad1436ceae0128e187222fce0fc79adb3049d3f)
Diffstat (limited to 'source3/groupdb/mapping.h')
-rw-r--r--source3/groupdb/mapping.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/groupdb/mapping.h b/source3/groupdb/mapping.h
new file mode 100644
index 0000000000..9daaa7fdd7
--- /dev/null
+++ b/source3/groupdb/mapping.h
@@ -0,0 +1,26 @@
+#define DATABASE_VERSION_V1 1 /* native byte format. */
+#define DATABASE_VERSION_V2 2 /* le format. */
+
+#define GROUP_PREFIX "UNIXGROUP/"
+
+/* Alias memberships are stored reverse, as memberships. The performance
+ * critical operation is to determine the aliases a SID is member of, not
+ * listing alias members. So we store a list of alias SIDs a SID is member of
+ * hanging of the member as key.
+ */
+#define MEMBEROF_PREFIX "MEMBEROF/"
+
+/* internal prototypes */
+BOOL enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
+ size_t *p_num_entries, BOOL unix_only);
+BOOL group_map_remove(const DOM_SID *sid);
+BOOL init_group_mapping(void);
+NTSTATUS one_alias_membership(const DOM_SID *member,
+ DOM_SID **sids, size_t *num);
+BOOL get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map);
+BOOL get_group_map_from_gid(gid_t gid, GROUP_MAP *map);
+BOOL get_group_map_from_ntname(const char *name, GROUP_MAP *map);
+BOOL add_mapping_entry(GROUP_MAP *map, int flag);
+NTSTATUS add_aliasmem(const DOM_SID *alias, const DOM_SID *member);
+NTSTATUS del_aliasmem(const DOM_SID *alias, const DOM_SID *member);
+NTSTATUS enum_aliasmem(const DOM_SID *alias, DOM_SID **sids, size_t *num);