diff options
author | Michael Adam <obnox@samba.org> | 2010-06-16 09:26:17 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2010-08-14 02:10:46 +0200 |
commit | 2b9ad09ae7bbfc4382e620705b2bc9c06e60fa5a (patch) | |
tree | a72bec3f051f57f09f3ef08237c88ccfddab62ce /source3/winbindd | |
parent | 9e8df7403af834699eb94a71a5c1131a98c8b4c9 (diff) | |
download | samba-2b9ad09ae7bbfc4382e620705b2bc9c06e60fa5a.tar.gz samba-2b9ad09ae7bbfc4382e620705b2bc9c06e60fa5a.tar.bz2 samba-2b9ad09ae7bbfc4382e620705b2bc9c06e60fa5a.zip |
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.
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/idmap_tdb.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index 6f7b72700e..140d896a2c 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -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 **********************************/ |