diff options
author | Jeremy Allison <jra@samba.org> | 2002-03-21 23:19:17 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-03-21 23:19:17 +0000 |
commit | 42955a4d8152ed583394db1954b307f965583265 (patch) | |
tree | 5fcf25033e0d2e9b1a993cd8bcf97d236fa8f004 | |
parent | a3468c25a40cf434a43bbde49fb2b7643c652238 (diff) | |
download | samba-42955a4d8152ed583394db1954b307f965583265.tar.gz samba-42955a4d8152ed583394db1954b307f965583265.tar.bz2 samba-42955a4d8152ed583394db1954b307f965583265.zip |
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)
-rw-r--r-- | source3/nsswitch/winbindd_idmap.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |