diff options
author | Magnus Hagander <magnus@hagander.net> | 2010-03-08 10:01:24 +0000 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2010-03-08 10:01:24 +0000 |
commit | 527741923701430f305a563aeda1e6119507bcf5 (patch) | |
tree | 600b4ed138572e97493dd23839363868f7289675 /src/interfaces/libpq/fe-auth.c | |
parent | 12eaac7775c0e4f2a0402175bb8ac541ccce52ff (diff) |
Require hostname to be set when using GSSAPI authentication. Without it,
the GSSAPI libraries crash.
Noted by Zdenek Kotala
Diffstat (limited to 'src/interfaces/libpq/fe-auth.c')
-rw-r--r-- | src/interfaces/libpq/fe-auth.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index a41242ba046..71959fac8b0 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.142 2009/06/11 14:49:13 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.142.2.1 2010/03/08 10:01:24 mha Exp $ * *------------------------------------------------------------------------- */ @@ -426,6 +426,12 @@ pg_GSS_startup(PGconn *conn) int maxlen; 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) { printfPQExpBuffer(&conn->errorMessage, |