From d89e6c774bbf6738183459c52acbd3220482d58a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Jun 2007 12:44:04 +0000 Subject: r23364: add LDB_FLG_NOMMAP flag (This used to be commit 0c3442c68b01b6804f3fd966fc1fe9097eb863aa) --- source4/lib/ldb/include/ldb.h | 5 +++++ source4/lib/ldb/ldb_tdb/ldb_tdb.c | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index 3e09cf1506..10b9b4c8ce 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -232,6 +232,11 @@ struct ldb_utf8_fns { */ #define LDB_FLG_RECONNECT 4 +/** + Flag to tell backends not to use mmap +*/ +#define LDB_FLG_NOMMAP 8 + /* structures for ldb_parse_tree handling code */ diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index dee61308d3..b8e2ec6191 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -1014,6 +1014,11 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url, tdb_flags |= TDB_NOSYNC; } + /* and nommap option */ + if (flags & LDB_FLG_NOMMAP) { + tdb_flags |= TDB_NOMMAP; + } + if (flags & LDB_FLG_RDONLY) { open_flags = O_RDONLY; } else { -- cgit