Hello community,

here is the log from the commit of package compat-libldap-2_3 for 
openSUSE:Factory checked in at 2015-12-01 09:19:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/compat-libldap-2_3 (Old)
 and      /work/SRC/openSUSE:Factory/.compat-libldap-2_3.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "compat-libldap-2_3"

Changes:
--------
--- /work/SRC/openSUSE:Factory/compat-libldap-2_3/compat-libldap-2_3.changes    
2015-11-17 14:23:08.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.compat-libldap-2_3.new/compat-libldap-2_3.changes   
    2015-12-01 09:19:46.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Nov 30 10:07:05 UTC 2015 - h...@suse.com
+
+- Introduce patch 0011-Fix-ldap-host-lookup-ipv6.patch
+  to fix an issue with unresponsive LDAP host lookups in IPv6 environment.
+  (bsc#955210)
+
+-------------------------------------------------------------------

New:
----
  0011-Fix-ldap-host-lookup-ipv6.patch

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

Other differences:
------------------
++++++ compat-libldap-2_3.spec ++++++
--- /var/tmp/diff_new_pack.qOrnL0/_old  2015-12-01 09:19:47.000000000 +0100
+++ /var/tmp/diff_new_pack.qOrnL0/_new  2015-12-01 09:19:47.000000000 +0100
@@ -35,6 +35,7 @@
 Patch8:         openldap-2.3.37-libldap-ld_defconn-ldap_free_connection.dif
 Patch9:         openldap-2.3.37-libldap-tls_chkhost-its6239.dif
 Patch10:        openldap-2.3.37-libldap-ssl.dif
+Patch11:        0011-Fix-ldap-host-lookup-ipv6.patch
 BuildRequires:  cyrus-sasl-devel
 BuildRequires:  db-devel
 BuildRequires:  groff
@@ -71,6 +72,7 @@
 %patch8
 %patch9 -p1
 %patch10
+%patch11 -p1
 
 %build
 %{?suse_update_config:%{suse_update_config -f build}}

++++++ 0011-Fix-ldap-host-lookup-ipv6.patch ++++++
The patch was written by Christian Kornacker on 2014-01-08 to fix an issue with 
unresponsive
LDAP host lookups in IPv6 environment.

---
 libraries/libldap/util-int.c |   43 +++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 41 insertions(+), 2 deletions(-)

Index: openldap-2.3.37/libraries/libldap/util-int.c
===================================================================
--- openldap-2.3.37.orig/libraries/libldap/util-int.c
+++ openldap-2.3.37/libraries/libldap/util-int.c
@@ -527,10 +527,16 @@ static char *safe_realloc( char **buf, i
 
 char * ldap_pvt_get_fqdn( char *name )
 {
-       char *fqdn, *ha_buf;
+       int rc;
+       char *fqdn;
        char hostbuf[MAXHOSTNAMELEN+1];
+#ifdef HAVE_GETADDRINFO
+       struct addrinfo hints, *res;
+#else
+       char *ha_buf;
        struct hostent *hp, he_buf;
-       int rc, local_h_errno;
+       int local_h_errno;
+#endif
 
        if( name == NULL ) {
                if( gethostname( hostbuf, MAXHOSTNAMELEN ) == 0 ) {
@@ -541,6 +547,37 @@ char * ldap_pvt_get_fqdn( char *name )
                }
        }
 
+#ifdef HAVE_GETADDRINFO
+       memset( &hints, '\0', sizeof( hints ) );
+       hints.ai_family = AF_UNSPEC;
+       hints.ai_socktype = SOCK_STREAM;
+       hints.ai_flags |= AI_CANONNAME;
+
+       /* most getaddrinfo(3) use non-threadsafe resolver libraries */
+#if defined( LDAP_R_COMPILE )
+       ldap_pvt_thread_mutex_lock(&ldap_int_resolv_mutex);
+#endif
+
+       rc = getaddrinfo( name, NULL, &hints, &res );
+
+#if defined( LDAP_R_COMPILE )
+       ldap_pvt_thread_mutex_unlock(&ldap_int_resolv_mutex);
+#endif
+
+       if ( rc != 0 ) {
+               fqdn = LDAP_STRDUP( name );
+       } else {
+               while ( res ) {
+                       if ( res->ai_canonname ) {
+                               fqdn = LDAP_STRDUP ( res->ai_canonname );
+                               break;
+                       }
+                       res = res->ai_next;
+               }
+               freeaddrinfo( res );
+       }
+#else
+
        rc = ldap_pvt_gethostbyname_a( name,
                &he_buf, &ha_buf, &hp, &local_h_errno );
 
@@ -551,6 +588,8 @@ char * ldap_pvt_get_fqdn( char *name )
        }
 
        LDAP_FREE( ha_buf );
+#endif
+
        return fqdn;
 }
 

Reply via email to