mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
ITS#3440: (blind) fix for VxWorks inet_ntoa(3) leak,
use inet_ntoa_b(3) instead.
This commit is contained in:
parent
b48ace2dfe
commit
279033fc1c
4
configure
vendored
4
configure
vendored
@ -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 \
|
||||
|
@ -2531,6 +2531,7 @@ AC_CHECK_FUNCS( \
|
||||
getspnam \
|
||||
gettimeofday \
|
||||
initgroups \
|
||||
inet_ntoa_b \
|
||||
lockf \
|
||||
memcpy \
|
||||
memmove \
|
||||
|
@ -277,6 +277,9 @@
|
||||
/* 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
|
||||
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user