return status;
}
-
-NTSTATUS idmap_backends_unixid_to_sid(struct id_map *id)
-{
- struct idmap_domain *dom;
- struct id_map *maps[2];
- bool ok;
- int i;
-
- ok = idmap_init();
- if (!ok) {
- return NT_STATUS_NONE_MAPPED;
- }
-
- DEBUG(10, ("idmap_backend_unixid_to_sid: xid = %d (type %d)\n",
- id->xid.id, id->xid.type));
-
- maps[0] = id;
- maps[1] = NULL;
-
- /*
- * Always give passdb a chance first
- */
-
- dom = passdb_idmap_domain;
- if ((dom != NULL)
- && NT_STATUS_IS_OK(dom->methods->unixids_to_sids(dom, maps))
- && id->status == ID_MAPPED) {
- return NT_STATUS_OK;
- }
-
- dom = default_idmap_domain;
-
- for (i=0; i<num_domains; i++) {
- if ((id->xid.id >= idmap_domains[i]->low_id) &&
- (id->xid.id <= idmap_domains[i]->high_id)) {
- dom = idmap_domains[i];
- break;
- }
- }
-
- if (dom == NULL) {
- return NT_STATUS_NONE_MAPPED;
- }
-
- return dom->methods->unixids_to_sids(dom, maps);
-}
void idmap_close(void);
NTSTATUS idmap_allocate_uid(struct unixid *id);
NTSTATUS idmap_allocate_gid(struct unixid *id);
-NTSTATUS idmap_backends_unixid_to_sid(struct id_map *id);
NTSTATUS idmap_backend_unixids_to_sids(struct id_map **maps,
const char *domain_name);