static NTSTATUS idmap_allocate_unixid(struct unixid *id)
{
struct idmap_domain *dom;
- struct id_map *maps[2];
- struct id_map map;
NTSTATUS ret;
dom = idmap_find_domain(NULL);
return NT_STATUS_UNSUCCESSFUL;
}
- map.sid = NULL;
- map.status = ID_UNKNOWN;
- map.xid = *id;
-
- maps[0] = ↦
- maps[1] = NULL;
-
- ret = dom->methods->sids_to_unixids(dom, maps);
-
- if (!NT_STATUS_IS_OK(ret)) {
- return ret;
+ if (dom->methods->allocate_id == NULL) {
+ return NT_STATUS_NOT_IMPLEMENTED;
}
- *id = map.xid;
+ ret = dom->methods->allocate_id(dom, id);
- return NT_STATUS_OK;
+ return ret;
}