summaryrefslogtreecommitdiffstats
path: root/src/confdb/confdb.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-02-19 14:41:10 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-02-23 16:16:23 -0500
commit94cafd6f5b63aac3ad084d14fa3be24213374021 (patch)
treebe56f4f24826b5ad7dda3f3371ca00f03dfe6191 /src/confdb/confdb.c
parent978bea5902ece9b9f01d1d6525dbe0889a410ffc (diff)
downloadsssd-94cafd6f5b63aac3ad084d14fa3be24213374021.tar.gz
sssd-94cafd6f5b63aac3ad084d14fa3be24213374021.tar.xz
sssd-94cafd6f5b63aac3ad084d14fa3be24213374021.zip
Fix file permissions of config.ldb
Diffstat (limited to 'src/confdb/confdb.c')
-rw-r--r--src/confdb/confdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index 6981baa55..64653b1e6 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -521,6 +521,7 @@ int confdb_init(TALLOC_CTX *mem_ctx,
{
struct confdb_ctx *cdb;
int ret = EOK;
+ mode_t old_umask;
cdb = talloc_zero(mem_ctx, struct confdb_ctx);
if (!cdb)
@@ -552,7 +553,10 @@ int confdb_init(TALLOC_CTX *mem_ctx,
return EIO;
}
+ old_umask = umask(0177);
+
ret = ldb_connect(cdb->ldb, confdb_location, 0, NULL);
+ umask(old_umask);
if (ret != LDB_SUCCESS) {
DEBUG(0, ("Unable to open config database [%s]\n",
confdb_location));