s3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()
authorMichael Adam <obnox@samba.org>
Thu, 29 Jul 2010 21:20:21 +0000 (23:20 +0200)
committerMichael Adam <obnox@samba.org>
Sat, 14 Aug 2010 00:10:37 +0000 (02:10 +0200)
The idmap alloc methods are being removed.

source3/winbindd/idmap.c

index aaccc0c8e4194d832aa6f0d9f9a0e90ecf8e91db..5280136fdbbfb61ec3f0e4ffc6c3c43463b7e313 100644 (file)
@@ -622,14 +622,22 @@ fail:
 
 static NTSTATUS idmap_allocate_unixid(struct unixid *id)
 {
 
 static NTSTATUS idmap_allocate_unixid(struct unixid *id)
 {
-       struct idmap_alloc_context *ctx;
+       struct idmap_domain *dom;
        NTSTATUS ret;
 
        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;
 }
 
 
 }