]> git.sur5r.net Git - openldap/commitdiff
ITS#3440: (blind) fix for VxWorks inet_ntoa(3) leak,
authorKurt Zeilenga <kurt@openldap.org>
Fri, 14 Oct 2005 03:40:03 +0000 (03:40 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 14 Oct 2005 03:40:03 +0000 (03:40 +0000)
use inet_ntoa_b(3) instead.

configure
configure.in
include/portable.hin
libraries/libldap/os-ip.c

index 0b36283a7ad146592ad9699ca5ec2cc40e44d816..f8dc1b0e9156848f1b584b04e377131de3c7f8f8 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.600 2005/09/17 20:22:15 hallvard Exp .
+# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.601 2005/10/13 21:52:21 kurt Exp .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -41249,6 +41249,7 @@ fi
 
 
 
+
 
 
 for ac_func in \
@@ -41270,6 +41271,7 @@ for ac_func in \
        getspnam                \
        gettimeofday    \
        initgroups              \
+       inet_ntoa_b             \
        lockf                   \
        memcpy                  \
        memmove                 \
index 8c376899aef35b1b4c8558276fd325638b937b3d..ec8f749343e1c78ddfc4ed6211bc73e2031861dd 100644 (file)
@@ -2531,6 +2531,7 @@ AC_CHECK_FUNCS(           \
        getspnam                \
        gettimeofday    \
        initgroups              \
+       inet_ntoa_b             \
        lockf                   \
        memcpy                  \
        memmove                 \
index 4a0ede1d64c801c093d9e2ded8956834c465d4b1..10425199a36fc30ca0570c2ec7da7395a6c85030 100644 (file)
 /* define to you inet_aton(3) is available */
 #undef HAVE_INET_ATON
 
+/* Define to 1 if you have the `inet_ntoa_b' function. */
+#undef HAVE_INET_NTOA_B
+
 /* Define to 1 if you have the `inet_ntop' function. */
 #undef HAVE_INET_NTOP
 
index 65341b5e846d3f82d0c943bc94dbfb33b14be771..0c5fb36b8bfbcf548f590dfa940a2cb2ccf3f969 100644 (file)
@@ -529,8 +529,18 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb,
                                sizeof(sin.sin_addr) );
                }
 
+#ifdef HAVE_INET_NTOA_B
+               {
+                       /* for VxWorks */
+                       char address[INET_ADDR_LEN];
+                       inet_ntoa_b(sin.sin_address, address);
+                       osip_debug(ld, "ldap_connect_to_host: Trying %s:%d\n", 
+                               address, port, 0);
+               }
+#else
                osip_debug(ld, "ldap_connect_to_host: Trying %s:%d\n", 
                        inet_ntoa(sin.sin_addr), port, 0);
+#endif
 
                rc = ldap_pvt_connect(ld, s,
                        (struct sockaddr *)&sin, sizeof(sin),