diff options
-rw-r--r-- | source3/tdb/tdb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index 097209ff7a..0ec770ed81 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -1728,8 +1728,7 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, if (read(tdb->fd, &tdb->header, sizeof(tdb->header)) != sizeof(tdb->header) || strcmp(tdb->header.magic_food, TDB_MAGIC_FOOD) != 0 - || tdb->header.version != TDB_VERSION - || (tdb->header.hash_size != hash_size + || (tdb->header.version != TDB_VERSION && !(rev = (tdb->header.version==TDB_BYTEREV(TDB_VERSION))))) { /* its not a valid database - possibly initialise it */ if (!(open_flags & O_CREAT) || tdb_new_database(tdb, hash_size) == -1) { |