1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

actually obey the "use mmap" smb.conf option

(This used to be commit b36c98036bcbaa5545c9637cb632361122033cfd)
This commit is contained in:
Andrew Tridgell 2001-09-06 05:45:07 +00:00
parent b31055fa74
commit 1772584c35
2 changed files with 6 additions and 2 deletions

View File

@ -151,7 +151,7 @@ struct packet_struct *receive_unexpected(enum packet_type packet_type, int id,
{
TDB_CONTEXT *tdb2;
tdb2 = tdb_open(lock_path("unexpected.tdb"), 0, 0, O_RDONLY, 0);
tdb2 = tdb_open_log(lock_path("unexpected.tdb"), 0, 0, O_RDONLY, 0);
if (!tdb2) return NULL;
matched_packet = NULL;

View File

@ -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;