return status;
}
-static struct autorid_global_config *idmap_autorid_loadconfig(TALLOC_CTX * ctx)
+static struct autorid_global_config *idmap_autorid_loadconfig(struct db_context *db,
+ TALLOC_CTX *ctx)
{
TDB_DATA data;
unsigned long minvalue, rangesize, maxranges;
NTSTATUS status;
- status = dbwrap_fetch_bystring(autorid_db, ctx, CONFIGKEY, &data);
+ status = dbwrap_fetch_bystring(db, ctx, CONFIGKEY, &data);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("No saved config found\n"));
config->minvalue, config->rangesize, config->maxranges));
/* read previously stored config and current HWM */
- storedconfig = idmap_autorid_loadconfig(talloc_tos());
+ storedconfig = idmap_autorid_loadconfig(autorid_db, talloc_tos());
status = dbwrap_fetch_uint32_bystring(autorid_db, HWM, &hwm);
if (!NT_STATUS_IS_OK(status)) {