From 74618e2b82b5158adf42caf64af70cbd7c699c6c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 9 Jul 2000 13:14:19 +0000 Subject: Another round of those unportable config/build changes :-/ * Add option to build with OpenSSL out of the box. Fix thusly exposed bit rot. Although it compiles now, getting this to do something useful is left as an exercise. * Fix Kerberos options to defer checking for required libraries until all the other libraries are checked for. * Change default odbcinst.ini and krb5.srvtab path to PREFIX/etc. * Install work around for Autoconf's install-sh relative path anomaly. Get rid of old INSTL_*_OPTS variables, now that we don't need them anymore. * Use `gunzip -c' instead of g?zcat. Reportedly broke on AIX. * Look for only one of readline.h or readline/readline.h, not both. * Make check for PS_STRINGS cacheable. Don't test for the header files separately. * Disable fcntl(F_SETLK) test on Linux. * Substitute the standard GCC warnings set into CFLAGS in configure, don't add it on in Makefile.global. * Sweep through contrib tree to teach makefiles standard semantics. ... and in completely unrelated news: * Make postmaster.opts arbitrary options-aware. I still think we need to save the environment as well. --- src/interfaces/libpq/fe-connect.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/interfaces/libpq/fe-connect.c') diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index e1af29a1b2..c232256f60 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.130 2000/06/14 18:17:58 petere Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.131 2000/07/09 13:14:17 petere Exp $ * *------------------------------------------------------------------------- */ @@ -795,7 +795,7 @@ connectDBStart(PGconn *conn) np.protoVersion = htonl(NEGOTIATE_SSL_CODE); if (pqPacketSend(conn, (char *) &np, sizeof(StartupPacket)) != STATUS_OK) { - sprintf(conn->errorMessage, + printfPQExpBuffer(&conn->errorMessage, "connectDB() -- couldn't send SSL negotiation packet: errno=%d\n%s\n", errno, strerror(errno)); goto connect_errReturn; @@ -803,7 +803,7 @@ connectDBStart(PGconn *conn) /* Now receive the postmasters response */ if (recv(conn->sock, &SSLok, 1, 0) != 1) { - sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", + printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", errno, strerror(errno)); goto connect_errReturn; } @@ -816,7 +816,7 @@ connectDBStart(PGconn *conn) SSL_context = SSL_CTX_new(SSLv23_method()); if (!SSL_context) { - sprintf(conn->errorMessage, + printfPQExpBuffer(&conn->errorMessage, "connectDB() -- couldn't create SSL context: %s\n", ERR_reason_error_string(ERR_get_error())); goto connect_errReturn; @@ -826,7 +826,7 @@ connectDBStart(PGconn *conn) !SSL_set_fd(conn->ssl, conn->sock) || SSL_connect(conn->ssl) <= 0) { - sprintf(conn->errorMessage, + printfPQExpBuffer(&conn->errorMessage, "connectDB() -- couldn't establish SSL connection: %s\n", ERR_reason_error_string(ERR_get_error())); goto connect_errReturn; @@ -844,7 +844,7 @@ connectDBStart(PGconn *conn) } else if (SSLok != 'N') { - strcpy(conn->errorMessage, + printfPQExpBuffer(&conn->errorMessage, "Received invalid negotiation response.\n"); goto connect_errReturn; } -- cgit v1.2.1