summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/db_wrap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/db_wrap.c b/source4/lib/db_wrap.c
index e64f4fa647..b7a6a17ef8 100644
--- a/source4/lib/db_wrap.c
+++ b/source4/lib/db_wrap.c
@@ -124,6 +124,11 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
if (lp_parm_bool(-1, "ldb", "nosync", False)) {
flags |= LDB_FLG_NOSYNC;
}
+
+ /* we usually want Samba databases to be private. If we later
+ find we need one public, we will need to add a parameter to
+ ldb_wrap_connect() */
+ ldb_set_create_perms(ldb, 0600);
ret = ldb_connect(ldb, real_url, flags, options);
if (ret != LDB_SUCCESS) {