return winbind_gid_to_sid(sid, gid);
}
-static bool pdb_wbc_sam_sid_to_id(struct pdb_methods *methods,
- const DOM_SID *sid,
- union unid_t *id, enum lsa_SidType *type)
-{
- if (winbind_sid_to_uid(&id->uid, sid)) {
- *type = SID_NAME_USER;
- } else if (winbind_sid_to_gid(&id->gid, sid)) {
- /* We assume all gids are groups, not aliases */
- *type = SID_NAME_DOM_GRP;
- } else {
- return false;
- }
-
- return true;
-}
-
static NTSTATUS pdb_wbc_sam_enum_group_members(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
const DOM_SID *group,
return result;
}
-static NTSTATUS pdb_wbc_sam_get_account_policy(struct pdb_methods *methods, int policy_index, uint32 *value)
+static NTSTATUS pdb_wbc_sam_get_account_policy(struct pdb_methods *methods, enum pdb_policy_type type, uint32_t *value)
{
return NT_STATUS_UNSUCCESSFUL;
}
-static NTSTATUS pdb_wbc_sam_set_account_policy(struct pdb_methods *methods, int policy_index, uint32 value)
+static NTSTATUS pdb_wbc_sam_set_account_policy(struct pdb_methods *methods, enum pdb_policy_type type, uint32_t value)
{
return NT_STATUS_UNSUCCESSFUL;
}
const char *name)
{
NTSTATUS result = NT_STATUS_OK;
- char *user_name = NULL;
- char *domain = NULL;
+ const char *domain = "";
DOM_SID sid;
gid_t gid;
enum lsa_SidType name_type;
- if (!winbind_lookup_name(domain, user_name, &sid, &name_type)) {
+ if (!winbind_lookup_name(domain, name, &sid, &name_type)) {
result = NT_STATUS_NO_SUCH_GROUP;
goto done;
}
goto done;
}
- if (!_make_group_map(methods, domain, user_name, name_type, gid, &sid, map)) {
+ if (!_make_group_map(methods, domain, name, name_type, gid, &sid, map)) {
result = NT_STATUS_NO_SUCH_GROUP;
goto done;
}
}
static NTSTATUS pdb_wbc_sam_enum_aliasmem(struct pdb_methods *methods,
- const DOM_SID *alias, DOM_SID **pp_members,
- size_t *p_num_members)
+ const DOM_SID *alias,
+ TALLOC_CTX *mem_ctx,
+ DOM_SID **pp_members,
+ size_t *p_num_members)
{
return NT_STATUS_NOT_IMPLEMENTED;
}
(*pdb_method)->set_account_policy = pdb_wbc_sam_set_account_policy;
(*pdb_method)->uid_to_sid = pdb_wbc_sam_uid_to_sid;
(*pdb_method)->gid_to_sid = pdb_wbc_sam_gid_to_sid;
- (*pdb_method)->sid_to_id = pdb_wbc_sam_sid_to_id;
(*pdb_method)->search_groups = pdb_wbc_sam_search_groups;
(*pdb_method)->search_aliases = pdb_wbc_sam_search_aliases;