Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita11ea5e

Browse files
committed
Don't use gethostbyname2(). It's not portable and we don't claim to
support IPv6 anyway.
1 parent1e91782 commita11ea5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/interfaces/libpq/fe-secure.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.11 2002/09/04 20:31:47 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.12 2002/09/05 18:27:13 petere Exp $
1515
*
1616
* NOTES
1717
* The client *requires* a valid server certificate. Since
@@ -364,7 +364,7 @@ verify_cb(int ok, X509_STORE_CTX *ctx)
364364

365365
/*
366366
*Verify that common name resolves to peer.
367-
*This function is not thread-safe due togethostbyname2().
367+
*This function is not thread-safe due togethostbyname().
368368
*/
369369
staticint
370370
verify_peer(PGconn*conn)
@@ -391,7 +391,7 @@ verify_peer(PGconn *conn)
391391
return0;
392392

393393
/* what do we know about the peer's common name? */
394-
if ((h=gethostbyname2(conn->peer_cn,addr.sa_family))==NULL)
394+
if ((h=gethostbyname(conn->peer_cn))==NULL)
395395
{
396396
printfPQExpBuffer(&conn->errorMessage,
397397
libpq_gettext("error getting information about host (%s): %s\n"),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp