[SCM] CTDB repository - branch master updated -
f6409b19972fa94257af9aa51def539f639bc226
Ronnie Sahlberg
sahlberg at samba.org
Wed Apr 9 22:27:53 GMT 2008
The branch, master has been updated
via f6409b19972fa94257af9aa51def539f639bc226 (commit)
via 2ac9e29c13e9ce5903d26bcc3b845e3b05a53edc (commit)
via ac6a362fc2fc4a56b4c310478a96eb12daace176 (commit)
via a5b7dd97e3faf0c4f289240307d0e22a67cf2353 (commit)
from 401fb01f8cb06886e2c5c277a9a70512a9b68579 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f6409b19972fa94257af9aa51def539f639bc226
Author: Ronnie Sahlberg <sahlberg at samba.org>
Date: Thu Apr 10 07:01:22 2008 +1000
shell scripts need extra spaces sometime
commit 2ac9e29c13e9ce5903d26bcc3b845e3b05a53edc
Author: Ronnie Sahlberg <sahlberg at samba.org>
Date: Thu Apr 10 06:55:31 2008 +1000
update to version .33
commit ac6a362fc2fc4a56b4c310478a96eb12daace176
Author: Ronnie Sahlberg <sahlberg at samba.org>
Date: Thu Apr 10 06:51:53 2008 +1000
From Chris Cowan
secure the domain socket and set permissions properly
commit a5b7dd97e3faf0c4f289240307d0e22a67cf2353
Author: Ronnie Sahlberg <sahlberg at samba.org>
Date: Thu Apr 10 06:50:12 2008 +1000
add possibility to provide site local modifications to the event system
through a /etc/ctdb/rc.local script that is sources by /etc/ctdb/functions
-----------------------------------------------------------------------
Summary of changes:
config/functions | 8 ++++++++
packaging/RPM/ctdb.spec | 8 +++++++-
server/ctdb_daemon.c | 19 ++++++++-----------
3 files changed, 23 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/config/functions b/config/functions
index 9b33422..13bba6f 100644
--- a/config/functions
+++ b/config/functions
@@ -323,3 +323,11 @@ startstop_nfslock() {
;;
esac
}
+
+########################################################
+# load a site local config file
+########################################################
+
+[ -x $CTDB_BASE/rc.local ] && {
+ . $CTDB_BASE/rc.local
+}
diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index 991c6fc..6974739 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -5,7 +5,7 @@ Vendor: Samba Team
Packager: Samba Team <samba at samba.org>
Name: ctdb
Version: 1.0
-Release: 32
+Release: 33
Epoch: 0
License: GNU GPL version 3
Group: System Environment/Daemons
@@ -120,6 +120,12 @@ fi
%{_includedir}/ctdb_private.h
%changelog
+* Thu Apr 10 2008 : Version 1.0.33
+ - Add facilities to include site local adaptations to the eventscript
+ by /etc/ctdb/rc.local which will be read by all eventscripts.
+ - Add a "ctdb version" command.
+ - Secure the domain socket with proper permissions from Chris Cowan
+ - Bugfixes for AIX from Chris Cowan
* Wed Apr 02 2008 : Version 1.0.32
- Add a control to have a node execute the eventscripts with arbitrary
command line arguments.
diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c
index 3ba5998..24314e9 100644
--- a/server/ctdb_daemon.c
+++ b/server/ctdb_daemon.c
@@ -582,18 +582,7 @@ static int ux_socket_bind(struct ctdb_context *ctdb)
return -1;
}
- set_nonblocking(ctdb->daemon.sd);
set_close_on_exec(ctdb->daemon.sd);
-
-#if 0
- /* AIX doesn't like this :( */
- if (fchown(ctdb->daemon.sd, geteuid(), getegid()) != 0 ||
- fchmod(ctdb->daemon.sd, 0700) != 0) {
- DEBUG(DEBUG_CRIT,("Unable to secure ctdb socket '%s', ctdb->daemon.name\n"));
- goto failed;
- }
-#endif
-
set_nonblocking(ctdb->daemon.sd);
memset(&addr, 0, sizeof(addr));
@@ -604,6 +593,14 @@ static int ux_socket_bind(struct ctdb_context *ctdb)
DEBUG(DEBUG_CRIT,("Unable to bind on ctdb socket '%s'\n", ctdb->daemon.name));
goto failed;
}
+
+ if (chown(ctdb->daemon.name, geteuid(), getegid()) != 0 ||
+ chmod(ctdb->daemon.name, 0700) != 0) {
+ DEBUG(DEBUG_CRIT,("Unable to secure ctdb socket '%s', ctdb->daemon.name\n"));
+ goto failed;
+ }
+
+
if (listen(ctdb->daemon.sd, 10) != 0) {
DEBUG(DEBUG_CRIT,("Unable to listen on ctdb socket '%s'\n", ctdb->daemon.name));
goto failed;
--
CTDB repository
More information about the samba-cvs
mailing list