mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Refuse "local" lines in pg_hba.conf on platforms that don't support it
This makes the behavior compatible with that of hostssl, which also throws an error when there is no SSL support included.
This commit is contained in:
parent
764bde0f16
commit
5830f69665
@ -824,7 +824,16 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
|
||||
token = lfirst(line_item);
|
||||
if (strcmp(token, "local") == 0)
|
||||
{
|
||||
#ifdef HAVE_UNIX_SOCKETS
|
||||
parsedline->conntype = ctLocal;
|
||||
#else
|
||||
ereport(LOG,
|
||||
(errcode(ERRCODE_CONFIG_FILE_ERROR),
|
||||
errmsg("local connections are not supported by this build"),
|
||||
errcontext("line %d of configuration file \"%s\"",
|
||||
line_num, HbaFileName)));
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
else if (strcmp(token, "host") == 0
|
||||
|| strcmp(token, "hostssl") == 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user