summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-07-29 23:20:21 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:37 +0200
commit212468bc6e032c1f704a1d5042222b7299f9bcfb (patch)
treefd68dcd05d0d6af8a705c42250d77e6be42a2ee3 /source3/winbindd/idmap.c
parent770b22ff5aa3f852daaf6f0fd1b2f4f81d78343c (diff)
downloadsamba-212468bc6e032c1f704a1d5042222b7299f9bcfb.tar.gz
samba-212468bc6e032c1f704a1d5042222b7299f9bcfb.tar.bz2
samba-212468bc6e032c1f704a1d5042222b7299f9bcfb.zip
s3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()
The idmap alloc methods are being removed.
Diffstat (limited to 'source3/winbindd/idmap.c')
-rw-r--r--source3/winbindd/idmap.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index aaccc0c8e4..5280136fdb 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -622,14 +622,22 @@ fail:
static NTSTATUS idmap_allocate_unixid(struct unixid *id)
{
- struct idmap_alloc_context *ctx;
+ struct idmap_domain *dom;
NTSTATUS ret;
- if (!NT_STATUS_IS_OK(ret = idmap_alloc_init(&ctx))) {
- return ret;
+ dom = idmap_find_domain(NULL);
+
+ if (dom == NULL) {
+ return NT_STATUS_UNSUCCESSFUL;
}
- return ctx->methods->allocate_id(id);
+ if (dom->methods->allocate_id == NULL) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+
+ ret = dom->methods->allocate_id(dom, id);
+
+ return ret;
}