summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-08-27 11:28:18 -0700
committerJeremy Allison <jra@samba.org>2008-08-27 11:28:18 -0700
commite588f0bc36b1f199afc41389b052d991453af3f8 (patch)
tree2edf9853d36aa3b4e43f29b8f6545c421bd40511
parentdee5f093570a6586f4cf6d9dec4b002c33160862 (diff)
downloadsamba-e588f0bc36b1f199afc41389b052d991453af3f8.tar.gz
samba-e588f0bc36b1f199afc41389b052d991453af3f8.tar.bz2
samba-e588f0bc36b1f199afc41389b052d991453af3f8.zip
Be explicit about setting perms for the ldb. Helps others who may use this api.
Jeremy. (This used to be commit f0ea0f3502037db878238942ee0729f6940e0b01)
-rw-r--r--source3/groupdb/mapping_ldb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c
index ce65d7c46d..7ce879fb6e 100644
--- a/source3/groupdb/mapping_ldb.c
+++ b/source3/groupdb/mapping_ldb.c
@@ -60,6 +60,9 @@ static bool init_group_mapping(void)
ldb = ldb_init(NULL);
if (ldb == NULL) goto failed;
+ /* Ensure this db is created read/write for root only. */
+ ldb_set_create_perms(ldb, 0600);
+
existed = file_exist(db_path, NULL);
if (lp_parm_bool(-1, "groupmap", "nosync", False)) {