From 617c39ab5ffbefcd7d0536c72ffbb0c36ce04215 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Oct 2006 07:05:08 +0000 Subject: r19182: merge from samba4: add ldb_set_create_perms() function to set the create_perms after ldb_init() and before ldb_connect() metze (This used to be commit dd9d469eef337954b6aee4c86ac0691f52812456) --- source3/lib/ldb/common/ldb.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/lib/ldb/common') diff --git a/source3/lib/ldb/common/ldb.c b/source3/lib/ldb/common/ldb.c index b54febf208..28d1c7235a 100644 --- a/source3/lib/ldb/common/ldb.c +++ b/source3/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. -- cgit