1 #define DATABASE_VERSION_V1 1 /* native byte format. */
2 #define DATABASE_VERSION_V2 2 /* le format. */
4 #define GROUP_PREFIX "UNIXGROUP/"
5 #define GROUP_PREFIX_LEN 10
7 /* Alias memberships are stored reverse, as memberships. The performance
8 * critical operation is to determine the aliases a SID is member of, not
9 * listing alias members. So we store a list of alias SIDs a SID is member of
10 * hanging of the member as key.
12 #define MEMBEROF_PREFIX "MEMBEROF/"
13 #define MEMBEROF_PREFIX_LEN 9
16 groupdb mapping backend abstraction
18 struct mapping_backend
{
19 bool (*init_group_mapping
)(void);
20 bool (*add_mapping_entry
)(GROUP_MAP
*map
, int flag
);
21 bool (*get_group_map_from_sid
)(DOM_SID sid
, GROUP_MAP
*map
);
22 bool (*get_group_map_from_gid
)(gid_t gid
, GROUP_MAP
*map
);
23 bool (*get_group_map_from_ntname
)(const char *name
, GROUP_MAP
*map
);
24 bool (*group_map_remove
)(const DOM_SID
*sid
);
25 bool (*enum_group_mapping
)(const DOM_SID
*domsid
, enum lsa_SidType sid_name_use
,
27 size_t *p_num_entries
, bool unix_only
);
28 NTSTATUS (*one_alias_membership
)(const DOM_SID
*member
,
29 DOM_SID
**sids
, size_t *num
);
30 NTSTATUS (*add_aliasmem
)(const DOM_SID
*alias
, const DOM_SID
*member
);
31 NTSTATUS (*del_aliasmem
)(const DOM_SID
*alias
, const DOM_SID
*member
);
32 NTSTATUS (*enum_aliasmem
)(const DOM_SID
*alias
, TALLOC_CTX
*mem_ctx
,
33 DOM_SID
**sids
, size_t *num
);