summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-07-09 13:14:19 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-07-09 13:14:19 +0000
commit74618e2b82b5158adf42caf64af70cbd7c699c6c (patch)
treef4782dc597569b1e2feb6ac50cad217dc39f35ee /src/interfaces/libpq/fe-connect.c
parentb59c03f84206ed3f3f864dcbe337ec04b2a8558d (diff)
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.
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r--src/interfaces/libpq/fe-connect.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index e1af29a1b28..c232256f608 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;
}