tdb: Fix tdb_check() to work with read-only tdb databases.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 16 Aug 2010 00:43:32 +0000 (10:13 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 16 Aug 2010 00:50:59 +0000 (10:20 +0930)
commita5db1122ec48d7e7384066848457c850c1a6cf3c
treed46754c1f859954149d984a96ceea1964356614e
parent52a87e608d0406aee9df99f7ac3ce16e834b520b
tdb: Fix tdb_check() to work with read-only tdb databases.

(Import from SAMBA bc1c82ea137e1bf6cb55139a666c56ebb2226b23)
The function tdb_lockall() uses F_WRLCK internally, which doesn't work on
a fd opened with O_RDONLY. Use tdb_lockall_read() instead.
lib/tdb/common/check.c