Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

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: lib by zhenh from  (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: heartbeat by zhenh from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: lrm by zhenh from  (linux-ha-cvs@lists.linux-ha.org)
   4. Linux-HA CVS: mgmt by zhenh from 
      (linux-ha-cvs@lists.linux-ha.org)
   5. Linux-HA CVS: mgmt by zhenh from 
      (linux-ha-cvs@lists.linux-ha.org)


----------------------------------------------------------------------

Message: 1
Date: Tue, 15 Aug 2006 21:10:16 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/fencing


Modified Files:
        stonithd_lib.c 


Log Message:
fix a memory leak in stonith lib. found and fixed by dvlt(Yan Rong Ge)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/fencing/stonithd_lib.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- stonithd_lib.c      21 Jun 2006 02:22:52 -0000      1.29
+++ stonithd_lib.c      16 Aug 2006 03:10:15 -0000      1.30
@@ -1050,6 +1050,7 @@
 
        ZAPGDOBJ(st_op->node_name);
        ZAPGDOBJ(st_op->node_list);
+       ZAPGDOBJ(st_op->node_uuid);     
        ZAPGDOBJ(st_op->private_data);
        ZAPGDOBJ(st_op);
 }




------------------------------

Message: 2
Date: Tue, 15 Aug 2006 21:30:33 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : heartbeat

Dir     : linux-ha/heartbeat


Modified Files:
        config.c 


Log Message:
when heartbeat starts, restarts the lrmd in the case that there is an existing 
lrmd, fix #1333




------------------------------

Message: 3
Date: Wed, 16 Aug 2006 01:13:37 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: lrm by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : lrm

Dir     : linux-ha/lrm/lrmd


Modified Files:
        lrmd.c 


Log Message:
strncpy doesn't add the tail zero if the src is longer than the dest buf. This 
patch fixes this issue. found by dvlt(Yan Rong Ge)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lrm/lrmd/lrmd.c,v
retrieving revision 1.241
retrieving revision 1.242
diff -u -3 -r1.241 -r1.242
--- lrmd.c      15 Aug 2006 10:06:19 -0000      1.241
+++ lrmd.c      16 Aug 2006 07:13:37 -0000      1.242
@@ -1,4 +1,4 @@
-/* $Id: lrmd.c,v 1.241 2006/08/15 10:06:19 zhenh Exp $ */
+/* $Id: lrmd.c,v 1.242 2006/08/16 07:13:37 zhenh Exp $ */
 /*
  * Local Resource Manager Daemon
  *
@@ -1678,6 +1678,7 @@
                        int ret;
 
                        strncpy(client->lastrequest, type, 
sizeof(client->lastrequest));
+                       client->lastrequest[sizeof(client->lastrequest)-1]='\0';
                        client->lastreqstart = time(NULL);
                        /*call the handler of the message*/
                        ret = msg_maps[i].handler(client, msg);
@@ -3905,6 +3906,9 @@
 }
 /*
  * $Log: lrmd.c,v $
+ * Revision 1.242  2006/08/16 07:13:37  zhenh
+ * strncpy doesn't add the tail zero if the src is longer than the dest buf. 
This patch fixes this issue. found by dvlt(Yan Rong Ge)
+ *
  * Revision 1.241  2006/08/15 10:06:19  zhenh
  * return fail when we can't get the metadata
  *




------------------------------

Message: 4
Date: Wed, 16 Aug 2006 01:13:38 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : mgmt

Dir     : linux-ha/mgmt/daemon


Modified Files:
        mgmt_crm.c mgmt_internal.h 


Log Message:
strncpy doesn't add the tail zero if the src is longer than the dest buf. This 
patch fixes this issue. found by dvlt(Yan Rong Ge)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_crm.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- mgmt_crm.c  15 Aug 2006 08:28:09 -0000      1.65
+++ mgmt_crm.c  16 Aug 2006 07:13:37 -0000      1.66
@@ -307,8 +307,8 @@
                free_data_set(data_set);        
                return -1;
        }
-       strncpy(rsc_tag, get_rsc_tag(rsc), MAX_STRLEN);
-       strncpy(real_id, rsc_id, MAX_STRLEN);
+       STRNCPY(rsc_tag, get_rsc_tag(rsc), MAX_STRLEN);
+       STRNCPY(real_id, rsc_id, MAX_STRLEN);
 
        parent = get_parent(rsc);
        if (parent == NULL) {
@@ -320,7 +320,7 @@
                if (colon != NULL) {
                        *colon = '\0';
                }
-               strncpy(parent_tag, get_rsc_tag(parent), MAX_STRLEN);
+               STRNCPY(parent_tag, get_rsc_tag(parent), MAX_STRLEN);
                
                snprintf(prefix, MAX_STRLEN,"<%s id=\"%s\"><%s id=\"%s\">"
                ,       parent_tag, parent->id, rsc_tag, real_id);
@@ -356,7 +356,7 @@
                free_data_set(data_set);
                return;
        }
-       strncpy(id, cur_id, MAX_STRLEN);
+       STRNCPY(id, cur_id, MAX_STRLEN);
        free_data_set(data_set);
        return;                                 
 
@@ -399,7 +399,7 @@
                        if ( strncmp(name_nvpair,attr,MAX_STRLEN) == 0 ) {
                                id_nvpair = ha_msg_value(nvpair,"id");
                                if (id_nvpair != NULL) {
-                                       strncpy(id,id_nvpair,MAX_STRLEN);
+                                       STRNCPY(id,id_nvpair,MAX_STRLEN);
                                        free_data_set(data_set);
                                        return;                                 
                                }
@@ -1436,8 +1436,8 @@
        }
        parent = get_parent(rsc);
        
-       strncpy(rsc_tag, get_rsc_tag(rsc), MAX_STRLEN);
-       strncpy(real_id, argv[1], MAX_STRLEN);
+       STRNCPY(rsc_tag, get_rsc_tag(rsc), MAX_STRLEN);
+       STRNCPY(real_id, argv[1], MAX_STRLEN);
 
        parent = get_parent(rsc);
        if (parent == NULL) {
@@ -1449,7 +1449,7 @@
                if (colon != NULL) {
                        *colon = '\0';
                }
-               strncpy(parent_tag, get_rsc_tag(parent), MAX_STRLEN);
+               STRNCPY(parent_tag, get_rsc_tag(parent), MAX_STRLEN);
                
                snprintf(xml, MAX_STRLEN,"<%s id=\"%s\">" \
                        "<%s id=\"%s\" %s=\"%s\"/></%s>" \
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_internal.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- mgmt_internal.h     11 Aug 2006 07:07:22 -0000      1.5
+++ mgmt_internal.h     16 Aug 2006 07:13:37 -0000      1.6
@@ -36,7 +36,9 @@
         if ( debug_level > 0 ) { \
                 cl_log(priority, fmt); \
        }
-
+#define STRNCPY(dest,src,n) \
+       strncpy(dest,src,n); dest[n-1]='\0';
+       
 #define ARGC_CHECK(n)          \
 if (argc != (n)) {                                     \
        mgmt_log(LOG_DEBUG, "%s msg should have %d params, but %d 
given",argv[0],n,argc);       \




------------------------------

Message: 5
Date: Wed, 16 Aug 2006 01:24:41 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : mgmt

Dir     : linux-ha/mgmt/daemon


Modified Files:
        mgmtd.c 


Log Message:
make the mgmtd listening socket to be reusable. the patch is from dvlt(Yan Rong 
Ge)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmtd.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- mgmtd.c     20 Jul 2006 07:49:11 -0000      1.23
+++ mgmtd.c     16 Aug 2006 07:24:40 -0000      1.24
@@ -322,6 +322,8 @@
        struct sockaddr_in      saddr;
        GIOChannel*             sch;
        int                     ret;
+       int                     optval;
+       
        /* register pid */
        if (cl_lock_pidfile(PID_FILE) < 0) {
                mgmt_log(LOG_ERR, "already running: [pid %d]."
@@ -370,6 +372,11 @@
                                  "Shutting down.");
                exit(100);
        }
+       
+       /* reuse address */
+       optval = 1;
+       setsockopt(ssock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval));   
+       
        /* bind server socket*/
        memset(&saddr, '\0', sizeof(saddr));
        saddr.sin_family = AF_INET;




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 33, Issue 67
********************************************

Reply via email to