From 42955a4d8152ed583394db1954b307f965583265 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 21 Mar 2002 23:19:17 +0000 Subject: When upgrading from an old idmap tdb, remember to overwrite the reverse mapping as well as the forward one. Found this in doing the backport to 2.2.x. This is *essential* to upgrade an old idmap file to a new one. Jeremy. (This used to be commit 980355de0c9d0d1116b29b0a5be98d0b277f24dc) --- source3/nsswitch/winbindd_idmap.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_idmap.c b/source3/nsswitch/winbindd_idmap.c index c94b2b6053..6361cbc70a 100644 --- a/source3/nsswitch/winbindd_idmap.c +++ b/source3/nsswitch/winbindd_idmap.c @@ -276,6 +276,11 @@ static int convert_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA data, void *ignor return 0; } + if (tdb_store(idmap_tdb, data, key2, TDB_REPLACE) != 0) { + /* not good! */ + return 0; + } + tdb_delete(idmap_tdb, key); return 0; -- cgit