1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

Require hostname to be set when using GSSAPI authentication. Without it,

the GSSAPI libraries crash.

Noted by Zdenek Kotala
This commit is contained in:
Magnus Hagander
2010-03-08 10:01:20 +00:00
parent 6aff80e1bc
commit 19a9a5a15a

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.137 2008/01/31 18:58:30 tgl Exp $ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.137.2.1 2010/03/08 10:01:20 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -452,6 +452,12 @@ pg_GSS_startup(PGconn *conn)
int maxlen; int maxlen;
gss_buffer_desc temp_gbuf; gss_buffer_desc temp_gbuf;
if (!conn->pghost)
{
printfPQExpBuffer(&conn->errorMessage, libpq_gettext("host name must be specified\n"));
return STATUS_ERROR;
}
if (conn->gctx) if (conn->gctx)
{ {
printfPQExpBuffer(&conn->errorMessage, printfPQExpBuffer(&conn->errorMessage,