From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23219 invoked by alias); 30 Oct 2008 09:12:48 -0000 Received: (qmail 23208 invoked by alias); 30 Oct 2008 09:12:48 -0000 X-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com X-Spam-Level: Subject: STABLE2 - rgmanager: move state dump file where it belongs To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE2 X-Git-Reftype: branch X-Git-Oldrev: 8e7eaa9bc66e010e9c8c4938db67ef67573e6783 X-Git-Newrev: 0b5f7b6f80a8d00943374a98227b137f381498d1 From: "Fabio M. Di Nitto" Message-Id: <20081030091230.72C93120276@lists.fedorahosted.org> Date: Thu, 30 Oct 2008 09:12:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q4/txt/msg00167.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0b5f7b6f80a8d00943374a98227b137f381498d1 Commit: 0b5f7b6f80a8d00943374a98227b137f381498d1 Parent: 8e7eaa9bc66e010e9c8c4938db67ef67573e6783 Author: Fabio M. Di Nitto AuthorDate: Thu Oct 30 10:09:58 2008 +0100 Committer: Fabio M. Di Nitto 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 --- 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)) {