I added some missing \n's to libpq error output.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Index: src/interfaces/libpq/fe-auth.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v
retrieving revision 1.52
diff -c -r1.52 fe-auth.c
*** src/interfaces/libpq/fe-auth.c 2001/08/17 03:09:31 1.52
--- src/interfaces/libpq/fe-auth.c 2001/08/17 14:59:51
***************
*** 285,291 ****
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_init: krb5_init_context: %s",
error_message(retval));
return STATUS_ERROR;
}
--- 285,291 ----
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_init: krb5_init_context: %s\n",
error_message(retval));
return STATUS_ERROR;
}
***************
*** 294,300 ****
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_init: krb5_cc_default: %s",
error_message(retval));
krb5_free_context(pg_krb5_context);
return STATUS_ERROR;
--- 294,300 ----
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_init: krb5_cc_default: %s\n",
error_message(retval));
krb5_free_context(pg_krb5_context);
return STATUS_ERROR;
***************
*** 305,311 ****
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_init: krb5_cc_get_principal: %s",
error_message(retval));
krb5_cc_close(pg_krb5_context, pg_krb5_ccache);
krb5_free_context(pg_krb5_context);
--- 305,311 ----
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_init: krb5_cc_get_principal: %s\n",
error_message(retval));
krb5_cc_close(pg_krb5_context, pg_krb5_ccache);
krb5_free_context(pg_krb5_context);
***************
*** 316,322 ****
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_init: krb5_unparse_name: %s",
error_message(retval));
krb5_free_principal(pg_krb5_context, pg_krb5_client);
krb5_cc_close(pg_krb5_context, pg_krb5_ccache);
--- 316,322 ----
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_init: krb5_unparse_name: %s\n",
error_message(retval));
krb5_free_principal(pg_krb5_context, pg_krb5_client);
krb5_cc_close(pg_krb5_context, pg_krb5_ccache);
***************
*** 371,377 ****
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_sendauth: krb5_sname_to_principal: %s",
error_message(retval));
return STATUS_ERROR;
}
--- 371,377 ----
if (retval)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "pg_krb5_sendauth: krb5_sname_to_principal: %s\n",
error_message(retval));
return STATUS_ERROR;
}
***************
*** 385,391 ****
if (flags < 0 || fcntl(sock, F_SETFL, (long) (flags & ~O_NONBLOCK)))
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! libpq_gettext("could not set socket to blocking mode: %s"), strerror(errno));
krb5_free_principal(pg_krb5_context, server);
return STATUS_ERROR;
}
--- 385,391 ----
if (flags < 0 || fcntl(sock, F_SETFL, (long) (flags & ~O_NONBLOCK)))
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! libpq_gettext("could not set socket to blocking mode: %s\n"), strerror(errno));
krb5_free_principal(pg_krb5_context, server);
return STATUS_ERROR;
}
***************
*** 401,414 ****
if (retval == KRB5_SENDAUTH_REJECTED && err_ret)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! libpq_gettext("Kerberos 5 authentication rejected: %*s"),
err_ret->text.length, err_ret->text.data);
}
else
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "krb5_sendauth: %s",
! error_message(retval));
}
if (err_ret)
--- 401,413 ----
if (retval == KRB5_SENDAUTH_REJECTED && err_ret)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! libpq_gettext("Kerberos 5 authentication rejected: %*s\n"),
err_ret->text.length, err_ret->text.data);
}
else
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! "krb5_sendauth: %s\n", error_message(retval));
}
if (err_ret)
***************
*** 422,428 ****
if (fcntl(sock, F_SETFL, (long) flags))
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! libpq_gettext("could not restore non-blocking mode on socket: %s"),
strerror(errno));
ret = STATUS_ERROR;
}
--- 421,427 ----
if (fcntl(sock, F_SETFL, (long) flags))
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! libpq_gettext("could not restore non-blocking mode on socket: %s\n"),
strerror(errno));
ret = STATUS_ERROR;
}
***************
*** 594,600 ****
if (i == n_authsvcs)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! libpq_gettext("invalid authentication service name \"%s\", ignored"),
name);
}
return;
--- 593,599 ----
if (i == n_authsvcs)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
! libpq_gettext("invalid authentication service name \"%s\", ignored\n"),
name);
}
return;