]> git.ozlabs.org Git - ccan/commit
tdb: enforce hashing, via example hash in old rwlocks entry in header.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 10 Sep 2010 03:59:54 +0000 (13:29 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 10 Sep 2010 03:59:54 +0000 (13:29 +0930)
commit426c8dc977d0fb46286042f7072d86bc053836a1
tree8ff6954ea6251793f7c54bc1a6ec0655387498e5
parentfdf3c148052f30d10e8c72fbdbdaf67d4a51b11e
tdb: enforce hashing, via example hash in old rwlocks entry in header.

This means that older code will not be able to open new TDBs with
a non-default hash, *even* if they are using the correct hash.
Non-default hashes were unusual, but now SAMBA is considering using
a non-default hash, and avoiding corruption seems more important
than backwards compatibility for an obscure case.
ccan/tdb/check.c
ccan/tdb/open.c
ccan/tdb/tdb_private.h
ccan/tdb/test/run-wronghash-fail.c [new file with mode: 0644]
ccan/tdb/test/run-wronghash-old.c