groupdb: make mapping_tdb compatible to mapping_ldb
authorStefan Metzmacher <metze@samba.org>
Mon, 31 Mar 2008 09:24:10 +0000 (11:24 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 12 Apr 2008 08:01:42 +0000 (10:01 +0200)
mapping_ldb replaces the record if it already exists.
I'm not sure if that a good thing, but for now
both backends should provide the same behavior.

metze
(This used to be commit b313acdd31c97d032c3890764addf66c6b9a4d89)

source3/groupdb/mapping_tdb.c

index ffd7d20ab8d612bbceaaf44282c5abc481d84b2e..c6d9735e11982865be7597e5dee6a28e90254eb4 100644 (file)
@@ -143,7 +143,7 @@ static bool add_mapping_entry(GROUP_MAP *map, int flag)
 
        status = dbwrap_trans_store(
                db, string_term_tdb_data(key),
-               make_tdb_data((uint8_t *)buf, len), flag);
+               make_tdb_data((uint8_t *)buf, len), TDB_REPLACE);
 
        TALLOC_FREE(key);