[SCM] SAMBA-CTDB repository - branch v3-2-ctdb updated - 5eb599282fbb5739e0c39597722c5e8c95a1a4a2

Andrew Tridgell tridge at samba.org
Wed Aug 6 06:36:46 GMT 2008


The branch, v3-2-ctdb has been updated
       via  5eb599282fbb5739e0c39597722c5e8c95a1a4a2 (commit)
      from  fea704586e6d17b07ac1d54241143470c413bf28 (commit)

http://gitweb.samba.org/?p=tridge/samba-ctdb.git;a=shortlog;h=v3-2-ctdb


- Log -----------------------------------------------------------------
commit 5eb599282fbb5739e0c39597722c5e8c95a1a4a2
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Aug 6 16:35:43 2008 +1000

    fixed permissions on ctdb databases

-----------------------------------------------------------------------

Summary of changes:
 source/lib/dbwrap_ctdb.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/dbwrap_ctdb.c b/source/lib/dbwrap_ctdb.c
index d73f3e2..1cccecb 100644
--- a/source/lib/dbwrap_ctdb.c
+++ b/source/lib/dbwrap_ctdb.c
@@ -600,6 +600,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)));


-- 
SAMBA-CTDB repository


More information about the samba-cvs mailing list