public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: lhh@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, STABLE2, updated. cluster-2.02.00-11-gad67890 Date: Tue, 11 Mar 2008 20:03:00 -0000 [thread overview] Message-ID: <20080311200317.18306.qmail@sourceware.org> (raw) 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=ad6789072de8bc98e5ec439f2160f330be0f9730 The branch, STABLE2 has been updated via ad6789072de8bc98e5ec439f2160f330be0f9730 (commit) from ed685c5699aaf592ba3714529dce9f9719c34b10 (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 ad6789072de8bc98e5ec439f2160f330be0f9730 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
reply other threads:[~2008-03-11 20:03 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080311200317.18306.qmail@sourceware.org \ --to=lhh@sourceware.org \ --cc=cluster-cvs@sources.redhat.com \ --cc=cluster-devel@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).