diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/dbwrap/dbwrap_ctdb.c | 8 | ||||
-rw-r--r-- | source3/winbindd/idmap_tdb.c | 19 |
2 files changed, 2 insertions, 25 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 2b75e8fe05..7df025f9bb 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -1486,13 +1486,6 @@ static int db_ctdb_get_seqnum(struct db_context *db) return tdb_get_seqnum(ctx->wtdb->tdb); } -static int db_ctdb_get_flags(struct db_context *db) -{ - struct db_ctdb_ctx *ctx = talloc_get_type_abort(db->private_data, - struct db_ctdb_ctx); - return tdb_get_flags(ctx->wtdb->tdb); -} - static void db_ctdb_id(struct db_context *db, const uint8_t **id, size_t *idlen) { @@ -1608,7 +1601,6 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, result->traverse = db_ctdb_traverse; result->traverse_read = db_ctdb_traverse_read; result->get_seqnum = db_ctdb_get_seqnum; - result->get_flags = db_ctdb_get_flags; result->transaction_start = db_ctdb_transaction_start; result->transaction_commit = db_ctdb_transaction_commit; result->transaction_cancel = db_ctdb_transaction_cancel; diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index d3e1d2b64b..cc930fffb7 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -146,31 +146,16 @@ static int convert_fn(struct db_record *rec, void *private_data) static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db) { int32 vers; - bool bigendianheader; struct convert_fn_state s; NTSTATUS status; - /* If we are bigendian, tdb is bigendian if NOT converted. */ - union { - uint16 large; - unsigned char small[2]; - } u; - u.large = 0x0102; - if (u.small[0] == 0x01) - bigendianheader = !(dbwrap_get_flags(db) & TDB_CONVERT); - else { - assert(u.small[0] == 0x02); - bigendianheader = (dbwrap_get_flags(db) & TDB_CONVERT); - } - DEBUG(0, ("Upgrading winbindd_idmap.tdb from an old version\n")); - status = dbwrap_fetch_int32_bystring(db, "IDMAP_VERSION", &vers); if (!NT_STATUS_IS_OK(status)) { vers = -1; } - if (((vers == -1) && bigendianheader) || (IREV(vers) == IDMAP_VERSION)) { - /* Arrggghh ! Bytereversed or old big-endian - make order independent ! */ + if (IREV(vers) == IDMAP_VERSION) { + /* Arrggghh ! Bytereversed - make order independent ! */ /* * high and low records were created on a * big endian machine and will need byte-reversing. |