Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5830f69

Browse files
committed
Refuse "local" lines in pg_hba.conf on platforms that don't support it
This makes the behavior compatible with that of hostssl, whichalso throws an error when there is no SSL support included.
1 parent764bde0 commit5830f69

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/backend/libpq/hba.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,16 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
824824
token=lfirst(line_item);
825825
if (strcmp(token,"local")==0)
826826
{
827+
#ifdefHAVE_UNIX_SOCKETS
827828
parsedline->conntype=ctLocal;
829+
#else
830+
ereport(LOG,
831+
(errcode(ERRCODE_CONFIG_FILE_ERROR),
832+
errmsg("local connections are not supported by this build"),
833+
errcontext("line %d of configuration file \"%s\"",
834+
line_num,HbaFileName)));
835+
return false;
836+
#endif
828837
}
829838
elseif (strcmp(token,"host")==0
830839
||strcmp(token,"hostssl")==0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp