Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: crm by andrew from
([email protected])
2. Linux-HA CVS: lib by andrew from
([email protected])
3. Linux-HA CVS: heartbeat by andrew from
([email protected])
4. Linux-HA CVS: linux-ha by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Thu, 9 Mar 2006 03:04:51 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/cib
Modified Files:
io.c
Log Message:
Switch to our homegrown md5 implementation
Disable the post-write verification now that we know it works
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- io.c 8 Mar 2006 22:24:29 -0000 1.49
+++ io.c 9 Mar 2006 10:04:50 -0000 1.50
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.49 2006/03/08 22:24:29 andrew Exp $ */
+/* $Id: io.c,v 1.50 2006/03/09 10:04:50 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -88,51 +88,30 @@
#include <pwd.h>
#include <grp.h>
-#if HAVE_OPENSSL_EVP_H
-#include <openssl/evp.h>
-#endif
+#include <clplumbing/md5.h>
+/* "c048eae664dba840e1d2060f00299e9d" */
static char *
calculate_cib_digest(crm_data_t *local_cib)
{
-#if HAVE_OPENSSL_EVP_H
- EVP_MD_CTX mdctx;
- static const EVP_MD *md = NULL;
- unsigned char md_value[EVP_MAX_MD_SIZE];
- unsigned int md_len = 0;
- int digest_len = 0;
- int i;
-
+ int i = 0;
+ int digest_len = 16;
char *digest = NULL;
+ unsigned char *raw_digest = NULL;
char *buffer = dump_xml_formatted(local_cib);
CRM_DEV_ASSERT(buffer != NULL && strlen(buffer) > 0);
-
- if(md == NULL) {
- OpenSSL_add_all_digests();
-
- md = EVP_get_digestbyname("md5");
- CRM_ASSERT(md != NULL);
- }
-
- EVP_MD_CTX_init(&mdctx);
- EVP_DigestInit_ex(&mdctx, md, NULL);
- EVP_DigestUpdate(&mdctx, buffer, strlen(buffer));
- EVP_DigestFinal_ex(&mdctx, md_value, &md_len);
- EVP_MD_CTX_cleanup(&mdctx);
-
- digest_len = 2 * md_len + 1;
- crm_malloc0(digest, sizeof(char) * digest_len);
- for(i = 0; i < md_len; i++) {
- sprintf(digest+(2*i), "%02x", md_value[i]);
- }
+
+ crm_malloc0(digest, sizeof(char) * (2 * digest_len + 1));
+ crm_malloc0(raw_digest, sizeof(char) * (digest_len + 1));
+ MD5((unsigned char *)buffer, strlen(buffer), raw_digest);
+ for(i = 0; i < digest_len; i++) {
+ sprintf(digest+(2*i), "%02x", raw_digest[i]);
+ }
crm_debug_2("Digest is: %s\n", digest);
crm_free(buffer);
+ crm_free(raw_digest);
return digest;
-#else
- crm_err("Could not create a digest of the on-disk CIB");
- return crm_strdup("Unknown");
-#endif
}
static gboolean
@@ -278,7 +257,7 @@
if( S_ISREG(buf.st_mode) == FALSE ) {
crm_err("%s must be a regular file", filename);
- sleep(5);
+ cl_flush_logs();
exit(100);
} else if( user_readwritable == FALSE ) {
@@ -630,11 +609,12 @@
exit(LSB_EXIT_GENERIC);
}
+#if 0
if(validate_on_disk_cib(CIB_FILENAME, NULL) == FALSE) {
crm_err("wrote incorrect digest");
exit(LSB_EXIT_GENERIC);
}
-
+#endif
exit(LSB_EXIT_OK);
return HA_OK;
}
------------------------------
Message: 2
Date: Thu, 9 Mar 2006 03:05:19 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/clplumbing
Modified Files:
cl_log.c
Log Message:
I have verified the sleep() is not required
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/cl_log.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- cl_log.c 8 Mar 2006 22:22:51 -0000 1.71
+++ cl_log.c 9 Mar 2006 10:05:19 -0000 1.72
@@ -1,4 +1,4 @@
-/* $Id: cl_log.c,v 1.71 2006/03/08 22:22:51 andrew Exp $ */
+/* $Id: cl_log.c,v 1.72 2006/03/09 10:05:19 andrew Exp $ */
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -730,7 +730,6 @@
return;
}
logging_daemon_chan->ops->waitout(logging_daemon_chan);
- sleep(2);
}
int
------------------------------
Message: 3
Date: Thu, 9 Mar 2006 03:06:42 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : heartbeat
Dir : linux-ha/heartbeat/lib
Modified Files:
BasicSanityCheck.in
Log Message:
Include the digest files in the list of items that need to be backed up
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/lib/BasicSanityCheck.in,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -3 -r1.93 -r1.94
--- BasicSanityCheck.in 1 Feb 2006 13:59:16 -0000 1.93
+++ BasicSanityCheck.in 9 Mar 2006 10:06:42 -0000 1.94
@@ -238,7 +238,11 @@
!
chmod 644 $1
}
-CONFIGFILES="$HADIR/ha.cf $HADIR/authkeys $HADIR/haresources
@HA_VARLIBDIR@/heartbeat/crm/cib.xml
@HA_VARLIBDIR@/heartbeat/crm/cib_backup.xml"
+CONFIGFILES="$HADIR/ha.cf $HADIR/authkeys $HADIR/haresources"
+CONFIGFILES="$CONFIGFILES @HA_VARLIBDIR@/heartbeat/crm/cib.xml"
+CONFIGFILES="$CONFIGFILES @HA_VARLIBDIR@/heartbeat/crm/cib.xml.sig"
+CONFIGFILES="$CONFIGFILES @HA_VARLIBDIR@/heartbeat/crm/cib.xml.last"
+CONFIGFILES="$CONFIGFILES @HA_VARLIBDIR@/heartbeat/crm/cib.xml.sig.last"
CACHEFILES="@HA_VARLIBDIR@/heartbeat/hostcache
@HA_VARLIBDIR@/heartbeat/delhostcache"
SetUpConfigFiles() {
------------------------------
Message: 4
Date: Thu, 9 Mar 2006 03:07:11 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: linux-ha by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Module : linux-ha
Dir : linux-ha
Modified Files:
ConfigureMe
Log Message:
tweak the library order on osx
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ConfigureMe,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- ConfigureMe 8 Mar 2006 23:39:59 -0000 1.47
+++ ConfigureMe 9 Mar 2006 10:07:10 -0000 1.48
@@ -163,7 +163,7 @@
# only works on 32-bit platforms but this seems to be equivilent:
# export LIBS="-L$SDK_ROOT/usr/lib -L/sw/lib $LIBS"
- export LIBS="-L$SDK_ROOT/usr/lib -L/sw/lib $LIBS"
+ export LIBS="-L$SDK_ROOT/usr/lib $LIBS -L/sw/lib"
CPPFLAGS="$CPPFLAGS -g -I$SDK_ROOT/usr/include"
CPPFLAGS="$CPPFLAGS -I/sw/usr/include -I/sw/include"
export CPPFLAGS
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 28, Issue 12
********************************************