This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
Cluster Project branch, RHEL5, updated. cmirror_1_1_15-65-gfd57f9e
- From: lhh at sourceware dot org
- To: cluster-cvs at sources dot redhat dot com, cluster-devel at redhat dot com
- Date: 8 May 2008 21:02:25 -0000
- Subject: Cluster Project branch, RHEL5, updated. cmirror_1_1_15-65-gfd57f9e
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".
http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=fd57f9e4023cbeadecba15e7093213e507661de9
The branch, RHEL5 has been updated
via fd57f9e4023cbeadecba15e7093213e507661de9 (commit)
from 85f99a1f7de8252a73582399194478ad7b2a5845 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fd57f9e4023cbeadecba15e7093213e507661de9
Author: Lon Hohberger <lhh@redhat.com>
Date: Tue Mar 11 15:59:50 2008 -0400
[rgmanager] Set cloexec bit in msg_socket.c
Resolves Red Hat bugzilla #433313. Rgmanager did not
have the close on exec bit set for any sockets it was
managing, causing problems with SELinux
-----------------------------------------------------------------------
Summary of changes:
rgmanager/src/clulib/msg_socket.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/clulib/msg_socket.c b/rgmanager/src/clulib/msg_socket.c
index 9e88ed7..c392757 100644
--- a/rgmanager/src/clulib/msg_socket.c
+++ b/rgmanager/src/clulib/msg_socket.c
@@ -36,6 +36,15 @@
static msg_ops_t sock_msg_ops;
+static void
+set_cloexec(int sock)
+{
+ long sock_flags;
+
+ sock_flags = fcntl(sock, F_GETFD);
+ fcntl(sock, F_SETFD, sock_flags | FD_CLOEXEC);
+}
+
static int
sock_connect(void)
{
@@ -336,6 +345,8 @@ sock_msg_accept(msgctx_t *listenctx, msgctx_t *acceptctx)
if (acceptctx->u.local_info.sockfd < 0)
return -1;
+ set_cloexec(acceptctx->u.local_info.sockfd);
+
acceptctx->flags = (SKF_READ | SKF_WRITE);
return 0;
}
@@ -359,6 +370,7 @@ sock_msg_listen(int me, void *portp, msgctx_t **listen_ctx)
if (sock < 0)
return -1;
+ set_cloexec(sock);
unlink(RGMGR_SOCK);
om = umask(077);
su.sun_family = PF_LOCAL;
hooks/post-receive
--
Cluster Project