tdb: return ENOSYS if the tdb was created with spinlocks.
[samba.git] / lib / tdb / common / open.c
index 789bc73d3d762fe5a84c7db6bbe7befa5528905f..d5c043211115e1b7d2ba3337919a092c8ce3bb99 100644 (file)
@@ -392,6 +392,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
        if (header.rwlocks != 0 &&
            header.rwlocks != TDB_HASH_RWLOCK_MAGIC) {
                TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: spinlocks no longer supported\n"));
+               errno = ENOSYS;
                goto fail;
        }
        tdb->hash_size = header.hash_size;