mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3:idmap_tdb: add idmap_tdb_get_new_id() to allocate a new id given a domain
Currently this only works with the default domain, calling out to idmap_tdb_allocate_id(). In the future this will be extended to also work for non-default domains.
This commit is contained in:
parent
9e8df7403a
commit
2b9ad09ae7
@ -498,6 +498,30 @@ static NTSTATUS idmap_tdb_allocate_id(struct unixid *xid)
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate a new unix-ID.
|
||||
* For now this is for the default idmap domain only.
|
||||
* Should be extended later on.
|
||||
*/
|
||||
static NTSTATUS idmap_tdb_get_new_id(struct idmap_domain *dom,
|
||||
struct unixid *id)
|
||||
{
|
||||
NTSTATUS ret;
|
||||
|
||||
if (!strequal(dom->name, "*")) {
|
||||
DEBUG(3, ("idmap_tdb_get_new_id: "
|
||||
"Refusing allocation of a new unixid for domain'%s'. "
|
||||
"Currently only supported for the default "
|
||||
"domain \"*\".\n",
|
||||
dom->name));
|
||||
return NT_STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
ret = idmap_tdb_allocate_id(id);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**********************************
|
||||
Close the alloc tdb
|
||||
**********************************/
|
||||
|
Loading…
Reference in New Issue
Block a user