Hello community,

here is the log from the commit of package cluster-glue for openSUSE:Factory 
checked in at 2016-11-05 21:23:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cluster-glue (Old)
 and      /work/SRC/openSUSE:Factory/.cluster-glue.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cluster-glue"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cluster-glue/cluster-glue.changes        
2016-10-22 13:02:44.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cluster-glue.new/cluster-glue.changes   
2016-11-05 21:23:46.000000000 +0100
@@ -1,0 +2,9 @@
+Wed Nov 02 21:09:00 UTC 2016 - [email protected]
+
+- Update to version 1.0.12+v1.git.1478088779.afaeeb2:
+  * Low: stonith: Convert gethostbyname() usage to getaddrinfo()
+  * Low: apcmastersnmp: Convert gethostbyname() usage to getaddrinfo()
+  * Low: ipmilan_command: Convert gethostbyname() to getaddrinfo()
+  * Low: wti_mpc: Convert gethostbyname() usage to getaddrinfo()
+
+-------------------------------------------------------------------

Old:
----
  cluster-glue-1.0.12+v1.git.1476869614.524e5d0.tar.bz2

New:
----
  cluster-glue-1.0.12+v1.git.1478088779.afaeeb2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cluster-glue.spec ++++++
--- /var/tmp/diff_new_pack.c72QFd/_old  2016-11-05 21:23:47.000000000 +0100
+++ /var/tmp/diff_new_pack.c72QFd/_new  2016-11-05 21:23:47.000000000 +0100
@@ -39,7 +39,7 @@
 Summary:        Reusable cluster components
 License:        GPL-2.0 and LGPL-2.1+
 Group:          Productivity/Clustering/HA
-Version:        1.0.12+v1.git.1476869614.524e5d0
+Version:        1.0.12+v1.git.1478088779.afaeeb2
 Release:        0
 Url:            https://github.com/ClusterLabs/cluster-glue.git
 Source:         %{name}-%{version}.tar.bz2

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.c72QFd/_old  2016-11-05 21:23:47.000000000 +0100
+++ /var/tmp/diff_new_pack.c72QFd/_new  2016-11-05 21:23:47.000000000 +0100
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param 
name="url">git://github.com/ClusterLabs/cluster-glue.git</param>
-          <param 
name="changesrevision">524e5d01c1866269c7563b498a1827c10bb2bba0</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">afaeeb2f3e2a576c8a50ee3ce98e83e4da635c76</param></service></servicedata>
\ No newline at end of file

++++++ cluster-glue-1.0.12+v1.git.1476869614.524e5d0.tar.bz2 -> 
cluster-glue-1.0.12+v1.git.1478088779.afaeeb2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/AUTHORS 
new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/AUTHORS
--- old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/AUTHORS   2016-10-19 
11:33:34.000000000 +0200
+++ new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/AUTHORS   2016-11-02 
13:12:59.000000000 +0100
@@ -1,19 +1,69 @@
+abrugger <>
 Alan Robertson <[email protected]>
+Alessandro Federico <[email protected]>
+Alex Tsariounov <[email protected]>
 Andreas Mock <[email protected]>
 Andrew Beekhof <[email protected]>
+Ante Karamatic <[email protected]>
+Bernd Schubert <[email protected]>
+Borislav Borisov <[email protected]>
+Darren Mansell <[email protected]>
 Dave Blaschke <[email protected]>
 David Lee <[email protected]>
 Dejan Muhamedagic <[email protected]>
+Denis Chapligin <[email protected]>
+Florian Haas <[email protected]>
+Frederik Schüler <[email protected]>
+Gao,Yan <[email protected]>
+Goldwyn Rodrigues <[email protected]>
+Guochun Shi <[email protected]>
 Hannes Eder <[email protected]>
+Helmut Weymann <[email protected]>
+Hideo Yamauchi <[email protected]>
+Holger Teutsch <[email protected]>
 Huang Zhen <[email protected]>
+Jean Raby <[email protected]>
+Jochen Roeder <[email protected]>
 Junko Ikeda <[email protected]>
-Lars Marowsky-Bree <[email protected]>
+Kacper Kowalik <[email protected]>
+Kazuhiko Higashi <[email protected]>
+Kazuhiko Higashi <[email protected]>
+Kazunori INOUE <[email protected]>
+Keisuke MORI <[email protected]>
+kevin <>
+Kristoffer Grönlund <[email protected]>
+Lars Ellenberg <[email protected]>
+Lars Marowsky-Brée <[email protected]>
+lclaudio <>
 Martin Bene <[email protected]>
+Martin Gerhard Loschwitz <[email protected]>
+Michael Prokop <>
+Matt Soffen <[email protected]>
+Nhan Ngo Dinh <[email protected]>
+panjiam <>
+Pádraig Brady <[email protected]>
 Phil Carns <[email protected]>
+ram <>
+Raoul Bhatia <[email protected]>
+RaSca <[email protected]>
+Ruediger Oertel <[email protected]>
 Satomi Taniguchi <[email protected]>
 Sean Reifschneider <[email protected]>
 Sebastian Reitenbach <[email protected]>
+Senko Rasic <[email protected]>
 Serge Dubrouski <[email protected]>
 Simon Horman <[email protected]>
+Sun Jiang Dong <[email protected]>
+Takatoshi MATSUO <[email protected]>
+Tim Serong <[email protected]>
+Vadym Chepkov <[email protected]>
+William Seligman <[email protected]>
+Xiaoxiang Liu <[email protected]>
 Xinwei Hu <[email protected]>
- 
+yao zhao <[email protected]>
+Yixiong Zou <[email protected]>
+Yoshihiko SATO <[email protected]>
+Yuichi SEINO <[email protected]>
+Yusuke Iida <[email protected]>
+Zhaokai <[email protected]>
+Huang Zhen <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/lib/plugins/stonith/apcmastersnmp.c
 
new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/lib/plugins/stonith/apcmastersnmp.c
--- 
old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/lib/plugins/stonith/apcmastersnmp.c
       2016-10-19 11:33:34.000000000 +0200
+++ 
new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/lib/plugins/stonith/apcmastersnmp.c
       2016-11-02 13:12:59.000000000 +0100
@@ -716,6 +716,7 @@
        struct pluginDevice* sd = (struct pluginDevice *)s;
        int     rc;
        int *   i;
+       struct addrinfo *res;
        StonithNamesToGet       namestocopy [] =
        {       {ST_IPADDR,     NULL}
        ,       {ST_PORT,       NULL}
@@ -737,9 +738,12 @@
        PluginImports->mfree(namestocopy[1].s_value);
        sd->community = namestocopy[2].s_value;
 
-        /* try to resolve the hostname/ip-address */
-       if (gethostbyname(sd->hostname) != NULL) {
-               /* init snmp library */
+       /* try to resolve the hostname/ip-address */
+
+       rc = getaddrinfo(sd->hostname, NULL, NULL, &res);
+       if (rc == 0) {
+               freeaddrinfo(res);
+               /* init snmp library */
                init_snmp("apcmastersnmp");
 
                /* now try to get a snmp session */
@@ -747,7 +751,7 @@
 
                        /* ok, get the number of outlets from the masterswitch 
*/
                        if ((i = APC_read(sd->sptr, OID_NUM_OUTLETS, 
ASN_INTEGER))
-                               == NULL) {
+                               == NULL) {
                                LOG(PIL_CRIT
                                , "%s: cannot read number of outlets."
                                ,       __FUNCTION__);
@@ -767,8 +771,8 @@
                        ,       __FUNCTION__);
                }
        }else{
-               LOG(PIL_CRIT, "%s: cannot resolve hostname '%s', h_errno %d."
-               ,       __FUNCTION__, sd->hostname, h_errno);
+               LOG(PIL_CRIT, "%s: cannot resolve hostname '%s', %s."
+               ,       __FUNCTION__, sd->hostname, gai_strerror(rc));
        }
 
        /* not a valid config */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/lib/plugins/stonith/ipmilan_command.c
 
new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/lib/plugins/stonith/ipmilan_command.c
--- 
old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/lib/plugins/stonith/ipmilan_command.c
     2016-10-19 11:33:34.000000000 +0200
+++ 
new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/lib/plugins/stonith/ipmilan_command.c
     2016-11-02 13:12:59.000000000 +0100
@@ -23,7 +23,7 @@
 #include <stdlib.h> /* malloc() */
 #include <unistd.h> /* getopt() */
 #include <string.h> /* strerror() */
-#include <netdb.h> /* gethostbyname() */
+#include <netdb.h> /* getaddrinfo() */
 #include <sys/types.h>
 #include <sys/socket.h>
 
@@ -260,9 +260,9 @@
 static int
 setup_ipmi_conn(struct ipmilanHostInfo * host, int *request)
 {
-       int rv;
+       int rv, rc;
 
-       struct hostent *ent;
+       struct addrinfo *res;
        struct in_addr lan_addr[2];
        int lan_port[2];
        int num_addr = 1;
@@ -293,13 +293,13 @@
                return rv;
        }
 
-       ent = gethostbyname(host->ipaddr);
-       if (!ent) {
-               PILCallLog(PluginImports->log,PIL_CRIT, "gethostbyname failed: 
%s\n", strerror(h_errno));
+       rc = getaddrinfo(host->ipaddr, NULL, NULL, &res);
+       if (rc != 0) {
+               PILCallLog(PluginImports->log,PIL_CRIT, "getaddrinfo failed: 
%s\n", gai_strerror(rc));
                return 1;
        }
 
-       memcpy(&lan_addr[0], ent->h_addr_list[0], ent->h_length);
+       memcpy(&lan_addr[0], res->ai_addr, res->ai_addrlen);
        lan_port[0] = host->portnumber;
        lan_port[1] = 0;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/lib/plugins/stonith/wti_mpc.c 
new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/lib/plugins/stonith/wti_mpc.c
--- 
old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/lib/plugins/stonith/wti_mpc.c 
    2016-10-19 11:33:34.000000000 +0200
+++ 
new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/lib/plugins/stonith/wti_mpc.c 
    2016-11-02 13:12:59.000000000 +0100
@@ -650,6 +650,7 @@
 wti_mpc_set_config(StonithPlugin * s, StonithNVpair * list)
 {
        struct pluginDevice* sd = (struct pluginDevice *)s;
+       struct addrinfo *res;
        int     rc;
        char *  i;
     int mo;
@@ -679,7 +680,8 @@
        PluginImports->mfree(namestocopy[3].s_value);
 
         /* try to resolve the hostname/ip-address */
-       if (gethostbyname(sd->hostname) != NULL) {
+       if ((rc = getaddrinfo(sd->hostname, NULL, NULL, &res)) == 0) {
+               freeaddrinfo(res);
                /* init snmp library */
                init_snmp("wti_mpc");
 
@@ -732,8 +734,8 @@
                        ,       __FUNCTION__);
                }
        }else{
-               LOG(PIL_CRIT, "%s: cannot resolve hostname '%s', h_errno %d."
-               ,       __FUNCTION__, sd->hostname, h_errno);
+               LOG(PIL_CRIT, "%s: cannot resolve hostname '%s', %s."
+               ,       __FUNCTION__, sd->hostname, gai_strerror(rc));
        }
 
        /* not a valid config */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/lib/stonith/expect.c 
new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/lib/stonith/expect.c
--- old/cluster-glue-1.0.12+v1.git.1476869614.524e5d0/lib/stonith/expect.c      
2016-10-19 11:33:34.000000000 +0200
+++ new/cluster-glue-1.0.12+v1.git.1478088779.afaeeb2/lib/stonith/expect.c      
2016-11-02 13:12:59.000000000 +0100
@@ -480,13 +480,26 @@
        }else if (inet_pton(AF_INET6, host, (void*)&sockun.si6.sin6_addr)<0){
                sockun.si6.sin6_family = AF_INET6;
        }else{
-               struct hostent* hostp = gethostbyname(host);
-               if (hostp == NULL) {
+               struct addrinfo *res;
+               int rc;
+               rc = getaddrinfo(host, NULL, NULL, &res);
+               if (rc != 0) {
+                       errno = EINVAL;
+                       return -1;
+               }
+               if (res->ai_family == AF_INET6) {
+                       sockun.si6.sin6_family = res->ai_family;
+                       memcpy(&sockun.si6.sin6_addr, res->ai_addr, 
res->ai_addrlen);
+                       freeaddrinfo(res);
+               } else if (res->ai_family == AF_INET) {
+                       sockun.si4.sin_family = res->ai_family;
+                       memcpy(&sockun.si4.sin_addr, res->ai_addr, 
res->ai_addrlen);
+                       freeaddrinfo(res);
+               } else {
+                       freeaddrinfo(res);
                        errno = EINVAL;
                        return -1;
                }
-               sockun.si4.sin_family = hostp->h_addrtype;
-               memcpy(&sockun.si4.sin_addr, hostp->h_addr, hostp->h_length);
        }
        if ((sock = socket(sockun.si4.sin_family, SOCK_STREAM, 0)) < 0) {
                return -1;


Reply via email to