public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* STABLE2 - rgmanager: move state dump file where it belongs
@ 2008-10-30  9:12 Fabio M. Di Nitto
  0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2008-10-30  9:12 UTC (permalink / raw)
  To: cluster-cvs-relay

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)) {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-30  9:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-30  9:12 STABLE2 - rgmanager: move state dump file where it belongs Fabio M. Di Nitto

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).