summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/include/ldb.h5
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c5
2 files changed, 10 insertions, 0 deletions
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 {