r23367: check the "use mmap" option for ldb too
[sfrench/samba-autobuild/.git] / source / groupdb / mapping_ldb.c
index 8eafc2532b42477695fc6aabdb44ad1d0bf15ce9..4f3aa1853403ac15d12df4236d25cd62e1fedd14 100644 (file)
@@ -67,6 +67,10 @@ static BOOL init_group_mapping(void)
                flags |= LDB_FLG_NOSYNC;
        }
 
+       if (!lp_use_mmap()) {
+               flags |= LDB_FLG_NOMMAP;
+       }
+
        ret = ldb_connect(ldb, db_path, flags, NULL);
        if (ret != LDB_SUCCESS) {
                goto failed;