git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fed76b
)
fixed permissions on ctdb databases
author
Andrew Tridgell
<tridge@samba.org>
Wed, 6 Aug 2008 06:35:43 +0000
(16:35 +1000)
committer
Michael Adam
<obnox@samba.org>
Wed, 6 Aug 2008 08:51:04 +0000
(10:51 +0200)
(This used to be commit
123fc3980a83d956bffaa689f3af81bbf81ce1c1
)
source3/lib/dbwrap_ctdb.c
patch
|
blob
|
history
diff --git
a/source3/lib/dbwrap_ctdb.c
b/source3/lib/dbwrap_ctdb.c
index a66ea7ceb590e2b1d8dbcaabc44782ec7e78c150..cb4c573eb06698d2a50733c588ded6a6c68bd45f 100644
(file)
--- a/
source3/lib/dbwrap_ctdb.c
+++ b/
source3/lib/dbwrap_ctdb.c
@@
-488,6
+488,11
@@
struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
/* only pass through specific flags */
tdb_flags &= TDB_SEQNUM;
+ /* honor permissions if user has specified O_CREAT */
+ if (open_flags & O_CREAT) {
+ chmod(db_path, mode);
+ }
+
db_ctdb->wtdb = tdb_wrap_open(db_ctdb, db_path, hash_size, tdb_flags, O_RDWR, 0);
if (db_ctdb->wtdb == NULL) {
DEBUG(0, ("Could not open tdb %s: %s\n", db_path, strerror(errno)));