diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 4e12c78..e9bc525 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -988,6 +988,22 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline) return false; } + if (parsedline->conntype == ctLocal && + parsedline->auth_method == uaGSS) + { + ereport(LOG, + (errcode(ERRCODE_CONFIG_FILE_ERROR), + errmsg("gssapi authentication is not supported on local sockets"), + errcontext("line %d of configuration file \"%s\"", + line_num, HbaFileName))); + return false; + } + /* + * SSPI authentication can never be enabled on ctLocal connections, because + * it's only supported on Windows, where ctLocal isn't supported. + */ + + if (parsedline->conntype != ctHostSSL && parsedline->auth_method == uaCert) { diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index 6d35421..87aec04 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -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,