This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

master - rgmanager: move state dump file where it belongs


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3f03e42f0b62a387e37fd8c370da436e07cff856
Commit:        3f03e42f0b62a387e37fd8c370da436e07cff856
Parent:        e06d163973f08678893548154638702b5a60822f
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:09:58 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 7c0602a..775e07f 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)) {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]