Skip to content

Commit 6c6ee75

Browse files
committed
Disallow gssapi authentication on local connections, since it
requires a hostname to function. Noted by Zdenek Kotala
1 parent 676b26d commit 6c6ee75

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/backend/libpq/hba.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.201 2010/03/06 00:45:49 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.202 2010/03/08 09:57:26 mha Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -998,6 +998,22 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
998998
return false;
999999
}
10001000

1001+
if (parsedline->conntype == ctLocal &&
1002+
parsedline->auth_method == uaGSS)
1003+
{
1004+
ereport(LOG,
1005+
(errcode(ERRCODE_CONFIG_FILE_ERROR),
1006+
errmsg("gssapi authentication is not supported on local sockets"),
1007+
errcontext("line %d of configuration file \"%s\"",
1008+
line_num, HbaFileName)));
1009+
return false;
1010+
}
1011+
/*
1012+
* SSPI authentication can never be enabled on ctLocal connections, because
1013+
* it's only supported on Windows, where ctLocal isn't supported.
1014+
*/
1015+
1016+
10011017
if (parsedline->conntype != ctHostSSL &&
10021018
parsedline->auth_method == uaCert)
10031019
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy