summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-06-06 12:44:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:12 -0500
commitd89e6c774bbf6738183459c52acbd3220482d58a (patch)
tree7b6203b00d8a370618ff1fe1c43c087192089626 /source4/lib
parent14846bf4f6f185f550570e6a524c265d585454ef (diff)
downloadsamba-d89e6c774bbf6738183459c52acbd3220482d58a.tar.gz
samba-d89e6c774bbf6738183459c52acbd3220482d58a.tar.bz2
samba-d89e6c774bbf6738183459c52acbd3220482d58a.zip
r23364: add LDB_FLG_NOMMAP flag
(This used to be commit 0c3442c68b01b6804f3fd966fc1fe9097eb863aa)
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 {