summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-17 09:46:08 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:47 +0200
commit3315f2cf9b6113ff84dde3a402f98c5c49f74bb9 (patch)
tree51056f715ad7856f3f1514afa5b8c8b7ae0fe18b /source3
parent6d66018187624f4b0a0a21f34abb6e74053ce7d3 (diff)
downloadsamba-3315f2cf9b6113ff84dde3a402f98c5c49f74bb9.tar.gz
samba-3315f2cf9b6113ff84dde3a402f98c5c49f74bb9.tar.bz2
samba-3315f2cf9b6113ff84dde3a402f98c5c49f74bb9.zip
s3:idmap_tdb: add idmap domain arg to idmap_tdb_upgrade and use domain range
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/idmap_tdb.c8
1 files changed, 4 insertions, 4 deletions
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;