public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: "Fabio M. Di Nitto" <fabbione@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: STABLE2 - rgmanager: move state dump file where it belongs
Date: Thu, 30 Oct 2008 09:12:00 -0000	[thread overview]
Message-ID: <20081030091230.72C93120276@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0b5f7b6f80a8d00943374a98227b137f381498d1
Commit:        0b5f7b6f80a8d00943374a98227b137f381498d1
Parent:        8e7eaa9bc66e010e9c8c4938db67ef67573e6783
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Thu Oct 30 10:09:58 2008 +0100
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu Oct 30 10:12:18 2008 +0100

rgmanager: move state dump file where it belongs

commit bde3b975fc4caffaa2aabd82d7d3cda8f4432f6a did try to mitigate a
possible DoS in the wrong way.

Move the file where it belongs instead. rgmanager is a "long time"
running daemon and the pid is known upfront making the old fix
pointless.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 rgmanager/src/daemons/main.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 9f4a32f..68d8a93 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -707,14 +707,9 @@ event_loop(msgctx_t *localctx, msgctx_t *clusterctx)
 	tv.tv_usec = 0;
 
 	if (signalled) {
-		char dumpfile[PATH_MAX];
-
 		signalled = 0;
 
-		memset(dumpfile, 0, PATH_MAX);
-		sprintf(dumpfile, "/tmp/rgmanager-dump.%d", getpid());
- 
-		dump_internal_state(dumpfile);
+		dump_internal_state("/var/lib/cluster/rgmanager-dump");
 	}
 
 	while (running && (tv.tv_sec || tv.tv_usec)) {


                 reply	other threads:[~2008-10-30  9:12 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=20081030091230.72C93120276@lists.fedorahosted.org \
    --to=fabbione@fedoraproject.org \
    --cc=cluster-cvs-relay@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: link
Be 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).