1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/lib/tdb
Rusty Russell 4442c0b2c9 lib/tdb: fix transaction issue for HAVE_INCOHERENT_MMAP.
We unmap the tdb on expand, the remap.  But when we have INCOHERENT_MMAP
(ie. OpenBSD) and we're inside a transaction, doing the expand can mean
we need to read from the database to partially fill a transaction block.
This fails, because if mmap is incoherent we never allow accessing the
database via read/write.

The solution is not to unmap and remap until we've actually written the
padding at the end of the file.

Reported-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Fri Mar 23 02:53:15 CET 2012 on sn-devel-104
2012-03-23 02:53:15 +01:00
..
ABI tdb: add ABI/tdb-1.2.9.sigs 2010-12-29 11:26:12 +01:00
common lib/tdb: fix transaction issue for HAVE_INCOHERENT_MMAP. 2012-03-23 02:53:15 +01:00
docs tdb: Added doxygen documentation. 2011-01-19 11:26:34 +01:00
include tdb: use system include style for system headers 2011-03-15 12:22:19 +11:00
manpages tdb: add restore 2010-09-23 12:19:09 -07:00
python tdb2: create tdb2 versions of various testing TDBs. 2011-06-20 11:18:36 +02:00
script release-scripts: parametrize scripts 2010-02-08 10:29:06 -05:00
test lib/tdb: fix test/run-die-during-transaction when HAVE_INCOHERENT_MMAP. 2012-03-23 10:43:48 +10:30
tools Add "repack" command to tdbtool. 2012-01-07 02:18:40 +01:00
web Update tdb and talloc web pages 2009-05-05 19:04:39 -04:00
configure tdb: Remove autotools support. 2010-12-24 01:15:05 +01:00
doxy.config tdb: Added doxygen documentation. 2011-01-19 11:26:34 +01:00
libtdb.m4 tdb: tdb_summary() support. 2010-12-29 10:12:05 +01:00
Makefile tdb: import unit tests from CCAN into tdb/test/ 2012-02-14 04:05:43 +10:30
pytdb.c tdb: Fix python documentation for tdb module 2011-12-13 00:55:32 +11:00
tdb.pc.in s4-pkgconfig: add @LIB_RPATH@ to our link flags 2010-12-08 12:46:00 +01:00
wscript lib/tdb: fix tests for standalone out-of-tree. 2012-03-10 07:07:45 +01:00