s3:idmap_tdb2: use range from idmap_domain in idmap_tdb2_allocate_id
authorMichael Adam <obnox@samba.org>
Wed, 16 Jun 2010 15:14:51 +0000 (17:14 +0200)
committerMichael Adam <obnox@samba.org>
Sat, 14 Aug 2010 00:10:43 +0000 (02:10 +0200)
source3/winbindd/idmap_tdb2.c

index 6520e9951b60826fa079a4de2c0d612abf626adf..0c9488ae0375f86c41876c7c9c59e78573e88a9f 100644 (file)
@@ -241,14 +241,11 @@ static NTSTATUS idmap_tdb2_allocate_id(struct idmap_domain *dom,
        uint32_t high_hwm;
        uint32_t hwm = 0;
        NTSTATUS status;
-       struct idmap_tdb2_context *ctx;
        struct idmap_tdb2_allocate_id_context state;
 
        status = idmap_tdb2_open_db();
        NT_STATUS_NOT_OK_RETURN(status);
 
-       ctx = talloc_get_type(dom->private_data, struct idmap_tdb2_context);
-
        /* Get current high water mark */
        switch (xid->type) {
 
@@ -267,7 +264,7 @@ static NTSTATUS idmap_tdb2_allocate_id(struct idmap_domain *dom,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       high_hwm = ctx->filter_high_id;
+       high_hwm = dom->high_id;
 
        state.hwm = hwm;
        state.high_hwm = high_hwm;