summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-09-06 05:45:07 +0000
committerAndrew Tridgell <tridge@samba.org>2001-09-06 05:45:07 +0000
commit1772584c35189cba517c26bbde3205447f875952 (patch)
treef946f99dc4eac6bf8400bafcd64e6d2d357963e9 /source3/tdb
parentb31055fa74571b9dadd209633ac4547f4ac8368d (diff)
downloadsamba-1772584c35189cba517c26bbde3205447f875952.tar.gz
samba-1772584c35189cba517c26bbde3205447f875952.tar.bz2
samba-1772584c35189cba517c26bbde3205447f875952.zip
actually obey the "use mmap" smb.conf option
(This used to be commit b36c98036bcbaa5545c9637cb632361122033cfd)
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdbutil.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c
index 0a2f1f84d4..68a47a199d 100644
--- a/source3/tdb/tdbutil.c
+++ b/source3/tdb/tdbutil.c
@@ -350,7 +350,11 @@ static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...)
TDB_CONTEXT *tdb_open_log(char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode)
{
- TDB_CONTEXT *tdb = tdb_open(name, hash_size, tdb_flags,
+ TDB_CONTEXT *tdb;
+
+ if (!lp_use_mmap()) tdb_flags |= TDB_NOMMAP;
+
+ tdb = tdb_open(name, hash_size, tdb_flags,
open_flags, mode);
if (!tdb) return NULL;