From 3315f2cf9b6113ff84dde3a402f98c5c49f74bb9 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 17 Jun 2010 09:46:08 +0200 Subject: s3:idmap_tdb: add idmap domain arg to idmap_tdb_upgrade and use domain range --- source3/winbindd/idmap_tdb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/winbindd') diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index 5f769206f5..5c0d256678 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -136,7 +136,7 @@ static int convert_fn(struct db_record *rec, void *private_data) Convert the idmap database from an older version. *****************************************************************************/ -static bool idmap_tdb_upgrade(struct db_context *db) +static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db) { int32 vers; bool bigendianheader; @@ -162,7 +162,7 @@ static bool idmap_tdb_upgrade(struct db_context *db) if (wm != -1) { wm = IREV(wm); } else { - wm = idmap_tdb_state.low_uid; + wm = dom->low_id; } if (dbwrap_store_int32(db, HWM_USER, wm) == -1) { @@ -174,7 +174,7 @@ static bool idmap_tdb_upgrade(struct db_context *db) if (wm != -1) { wm = IREV(wm); } else { - wm = idmap_tdb_state.low_gid; + wm = dom->low_id; } if (dbwrap_store_int32(db, HWM_GROUP, wm) == -1) { @@ -293,7 +293,7 @@ static NTSTATUS idmap_tdb_open_db(TALLOC_CTX *memctx, goto done; } - if (!idmap_tdb_upgrade(db)) { + if (!idmap_tdb_upgrade(dom, db)) { db->transaction_cancel(db); DEBUG(0, ("Unable to open idmap database, it's in an old format, and upgrade failed!\n")); ret = NT_STATUS_INTERNAL_DB_ERROR; -- cgit