From dd004e8193ccdbb94de4c32e301a163f0b6d2d0e Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 28 Aug 2013 14:00:24 +0200 Subject: idmap_autorid: add a db_context argument to idmap_autorid_loadconfig() Pair-Programmed-with: Atul Kulkarni Signed-off-by: Michael Adam Signed-off-by: Atul Kulkarni Reviewed-by: Volker Lendecke --- source3/winbindd/idmap_autorid.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/winbindd') diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index 2b81202767..6b9a472381 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -751,7 +751,8 @@ static NTSTATUS idmap_autorid_db_init(void) 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; @@ -759,7 +760,7 @@ static struct autorid_global_config *idmap_autorid_loadconfig(TALLOC_CTX * ctx) 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")); @@ -937,7 +938,7 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom) 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)) { -- cgit