From: Jeremy Allison Date: Wed, 27 Aug 2008 18:28:18 +0000 (-0700) Subject: Be explicit about setting perms for the ldb. Helps others who may use this api. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0ea0f3502037db878238942ee0729f6940e0b01;p=thirdparty%2Fsamba.git Be explicit about setting perms for the ldb. Helps others who may use this api. Jeremy. --- diff --git a/source/groupdb/mapping_ldb.c b/source/groupdb/mapping_ldb.c index ce65d7c46d5..7ce879fb6ed 100644 --- a/source/groupdb/mapping_ldb.c +++ b/source/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)) {