packages heartbeat-1.2.3-CAN-2005-2231.patch
      Pages: < 1 >  DOWNLOAD      
diff -pur heartbeat-1.2.3/cts/CM_hb.py.in heartbeat-1.2.3-secfix/cts/CM_hb.py.in
--- heartbeat-1.2.3/cts/CM_hb.py.in	2004-09-03 16:12:11.000000000 +0200
+++ heartbeat-1.2.3-secfix/cts/CM_hb.py.in	2005-08-11 10:50:25.000000000 +0200
@@ -57,7 +57,7 @@ class HeartbeatCM(ClusterManager):
             "StartDRBDCmd"   : "@sysconfdir@/init.d/drbd start >/dev/null 2>&1",
             "StopDRBDCmd"    : "@sysconfdir@/init.d/drbd stop",
             "StatusDRBDCmd"  : "@sysconfdir@/init.d/drbd status",
-            "DRBDCheckconf"  : "@sysconfdir@/init.d/drbd checkconfig >/tmp/drbdconf 2>&1",
+            "DRBDCheckconf"  : "@sysconfdir@/init.d/drbd checkconfig >/var/run/drbdconf 2>&1",
             "BreakCommCmd"   : "@libdir@/heartbeat/TestHeartbeatComm break-communication >/dev/null 2>&1",
             "FixCommCmd"     : "@libdir@/heartbeat/TestHeartbeatComm fix-communication >/dev/null 2>&1",
             "IPaddrCmd"      : "@sysconfdir@/ha.d/resource.d/IPaddr %s status",
diff -pur heartbeat-1.2.3/cts/CTStests.py.in heartbeat-1.2.3-secfix/cts/CTStests.py.in
--- heartbeat-1.2.3/cts/CTStests.py.in	2004-09-04 23:31:15.000000000 +0200
+++ heartbeat-1.2.3-secfix/cts/CTStests.py.in	2005-08-11 10:56:48.000000000 +0200
@@ -870,7 +870,7 @@ class BandwidthTest(CTSTest):
             time.sleep(5)  # We get extra messages right after startup.
 
 
-        fstmpfile = "/tmp/band_estimate"
+        fstmpfile = "/var/run/band_estimate"
         dumpcmd = "tcpdump -p -n -c 102 -i any udp port %d > %s 2>&1" \
 	%		(port, fstmpfile);
  
@@ -1073,9 +1073,9 @@ class DRBDTest(CTSTest):
         while 1:
             if (time.time()>done):
                 return self.failure("the drbd could't sync")
-            self.CM.rsh(node,"cp /proc/drbd /tmp >/dev/null 2>&1")
-            if self.CM.rsh.cp("%s:/tmp/drbd" % node,"/tmp"):
-                line = open("/tmp/drbd").readlines()[2]
+            self.CM.rsh(node,"cp /proc/drbd /var/run >/dev/null 2>&1")
+            if self.CM.rsh.cp("%s:/var/run/drbd" % node,"/var/run"):
+                line = open("/var/run/drbd").readlines()[2]
                 p = line.find("Primary")
                 s1 = line.find("Secondary")
                 s2 = line.rfind("Secondary")
@@ -1111,8 +1111,8 @@ class DRBDTest(CTSTest):
     def getdevice(self,node):
         device=None
         if self.CM.rsh(node,self.CM["DRBDCheckconf"])==0:
-            self.CM.rsh.cp("%s:/tmp/drbdconf" % node, "/tmp")
-            lines=open("/tmp/drbdconf","r")
+            self.CM.rsh.cp("%s:/var/run/drbdconf" % node, "/var/run")
+            lines=open("/var/run/drbdconf","r")
             for line in lines:
                 if line.find("%s:device" % node)!=-1:
                     device=string.split(line," ")[8]
diff -pur heartbeat-1.2.3/heartbeat/lib/BasicSanityCheck.in heartbeat-1.2.3-secfix/heartbeat/lib/BasicSanityCheck.in
--- heartbeat-1.2.3/heartbeat/lib/BasicSanityCheck.in	2004-09-17 08:36:27.000000000 +0200
+++ heartbeat-1.2.3-secfix/heartbeat/lib/BasicSanityCheck.in	2005-08-11 10:59:21.000000000 +0200
@@ -43,7 +43,8 @@ DEFAULTINTERFACE=eth0	# But we really gu
 IDENTSTRING="Linux-HA TEST configuration file - REMOVEME!!"
 DUMMYNODE=ImAlwaysDead.com
 LOCALNODE=`uname -n`
-LOGFILE=/tmp/linux-ha.testlog
+LOGFILE=`tempfile -p l-ha. -s testlog`
+TMPFILE=`tempfile -p l-ha.`
 RSCDIR=$HADIR/resource.d
 errcount=0
 
@@ -228,9 +229,9 @@ else print $0 ; next } \
 if (done ==1 || $1 == "#" || $1 == " ") next; \
 if ($1 == "auth") {method = $2; next} \
 if ($1 !=  method) {done=1; method =$1;  pass=2; nextfile}}' \
-$HADIR/authkeys $HADIR/authkeys >/tmp/tmpfile
+$HADIR/authkeys $HADIR/authkeys >$TMPFILE
 
-mv /tmp/tmpfile  $HADIR/authkeys
+mv $TMPFILE $HADIR/authkeys
 chmod 600 $HADIR/authkeys
 }
 #	Check for the given count of the given string
@@ -532,7 +533,7 @@ StonithCheck() {
 
 
 AppHBCheck() {
-	CFFILE=/tmp/$$.apphbd.cf
+	CFFILE=`tempfile`
 	clientcount=5
 	cat <<-! >$CFFILE
 		realtime yes
diff -pur heartbeat-1.2.3/heartbeat/resource.d/WAS.in heartbeat-1.2.3-secfix/heartbeat/resource.d/WAS.in
--- heartbeat-1.2.3/heartbeat/resource.d/WAS.in	2002-03-24 00:39:42.000000000 +0100
+++ heartbeat-1.2.3-secfix/heartbeat/resource.d/WAS.in	2005-08-11 10:59:54.000000000 +0200
@@ -302,7 +302,7 @@ WAS_report_status() {
 #	This is actually faster than WAS_status above...
 #
 WAS_monitor() {
-  tmpfile=/tmp/$$.was-mon
+  tmpfile=`tempfile`
   SnoopPort=`GetWASSnoopPort $1`
   output=`$WGET -nv -O$tmpfile  http://localhost:$SnoopPort/servlet/snoop 2>&1`
   rc=$?
diff -pur heartbeat-1.2.3/lib/plugins/stonith/meatware.c heartbeat-1.2.3-secfix/lib/plugins/stonith/meatware.c
--- heartbeat-1.2.3/lib/plugins/stonith/meatware.c	2004-04-20 10:50:06.000000000 +0200
+++ heartbeat-1.2.3-secfix/lib/plugins/stonith/meatware.c	2005-08-11 11:00:35.000000000 +0200
@@ -308,7 +308,7 @@ static int
 meatware_reset_req(Stonith * s, int request, const char * host)
 {
 	int fd, rc;
-	const char *	meatpipe_pr = "/tmp/.meatware"; /* if you intend to
+	const char *	meatpipe_pr = "/var/run/meatware"; /* if you intend to
 							change this, modify
 							meatclient.c as well */
 
diff -pur heartbeat-1.2.3/lib/stonith/meatclient.c heartbeat-1.2.3-secfix/lib/stonith/meatclient.c
--- heartbeat-1.2.3/lib/stonith/meatclient.c	2004-04-20 11:08:51.000000000 +0200
+++ heartbeat-1.2.3-secfix/lib/stonith/meatclient.c	2005-08-11 11:01:26.000000000 +0200
@@ -55,7 +55,7 @@ int
 main(int argc, char** argv)
 {
 	char *		cmdname;
-	const char *	meatpipe_pr = "/tmp/.meatware";	/* if you intend to
+	const char *	meatpipe_pr = "/var/run/meatware";	/* if you intend to
 							 change this, modify
 							 meatware.c as well */
 	char *		opthost = NULL;