Commit a11ea5e2 authored by Peter Eisentraut's avatar Peter Eisentraut

Don't use gethostbyname2(). It's not portable and we don't claim to

support IPv6 anyway.
parent 1e917825
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.11 2002/09/04 20:31:47 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.12 2002/09/05 18:27:13 petere Exp $
* *
* NOTES * NOTES
* The client *requires* a valid server certificate. Since * The client *requires* a valid server certificate. Since
...@@ -364,7 +364,7 @@ verify_cb(int ok, X509_STORE_CTX *ctx) ...@@ -364,7 +364,7 @@ verify_cb(int ok, X509_STORE_CTX *ctx)
/* /*
* Verify that common name resolves to peer. * Verify that common name resolves to peer.
* This function is not thread-safe due to gethostbyname2(). * This function is not thread-safe due to gethostbyname().
*/ */
static int static int
verify_peer(PGconn *conn) verify_peer(PGconn *conn)
...@@ -391,7 +391,7 @@ verify_peer(PGconn *conn) ...@@ -391,7 +391,7 @@ verify_peer(PGconn *conn)
return 0; return 0;
/* what do we know about the peer's common name? */ /* what do we know about the peer's common name? */
if ((h = gethostbyname2(conn->peer_cn, addr.sa_family)) == NULL) if ((h = gethostbyname(conn->peer_cn)) == NULL)
{ {
printfPQExpBuffer(&conn->errorMessage, printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("error getting information about host (%s): %s\n"), libpq_gettext("error getting information about host (%s): %s\n"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment