]> git.ozlabs.org Git - ccan/commit
tdb: support tdb_check() on r/o databases.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Sep 2010 07:53:29 +0000 (17:23 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Sep 2010 07:53:29 +0000 (17:23 +0930)
commit550246bb457561fb8bffe909c54467090a11011a
treee280b617816dc7584d8de4ff2fa8ff9772e8ac86
parentb71a779dfc41e68c3601a4bea10d56582352fecc
tdb: support tdb_check() on r/o databases.

(Imported from SAMBA commit bc1c82ea137e1bf6cb55139a666c56ebb2226b23)

Author: Jeremy Allison <jra@samba.org>
Date:   Wed Jul 28 05:15:40 2010 -0700

Fix tdb_check() to work with read-only tdb databases. The function tdb_lockall() uses F_WRLCK internally, which doesn't work on a fd opened with O_RDONLY. Use tdb_lockall_read() instead.

Jeremy.
ccan/tdb/check.c