summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r--source4/lib/ldb/common/ldb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 00bf5e79ba..0981d9b25b 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -52,6 +52,7 @@ struct ldb_context *ldb_init(void *mem_ctx)
}
ldb_set_utf8_default(ldb);
+ ldb_set_create_perms(ldb, 0666);
return ldb;
}
@@ -455,6 +456,16 @@ int ldb_set_timeout_from_prev_req(struct ldb_context *ldb, struct ldb_request *o
return LDB_SUCCESS;
}
+
+/*
+ set the permissions for new files to be passed to open() in
+ backends that use local files
+ */
+void ldb_set_create_perms(struct ldb_context *ldb, unsigned int perms)
+{
+ ldb->create_perms = perms;
+}
+
/*
start an ldb request
NOTE: the request must be a talloc context.