Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4542581

Browse files
committed
Adjustment to test on unix domain socket variable for pg_hba.conf
default settings, rather than just Win32.
1 parent c93872d commit 4542581

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/backend/libpq/pg_hba.conf.sample

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060

6161
# TYPE DATABASE USER CIDR-ADDRESS METHOD
6262

63-
@remove-line-for-win32@# "local" is for Unix domain socket connections only
64-
@remove-line-for-win32@local all all @authmethod@
63+
@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
64+
@remove-line-for-nolocal@local all all @authmethod@
6565
# IPv4 local connections:
6666
host all all 127.0.0.1/32 @authmethod@
6767
# IPv6 local connections:

src/bin/initdb/initdb.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* Portions Copyright (c) 1994, Regents of the University of California
4040
* Portions taken from FreeBSD.
4141
*
42-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.55 2004/10/06 09:01:18 momjian Exp $
42+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.56 2004/10/06 09:13:10 momjian Exp $
4343
*
4444
*-------------------------------------------------------------------------
4545
*/
@@ -147,7 +147,7 @@ char backend_exec[MAXPGPATH];
147147
static void *xmalloc(size_t size);
148148
static char *xstrdup(const char *s);
149149
static char **replace_token(char **lines, char *token, char *replacement);
150-
#ifdef WIN32
150+
#ifndef HAVE_UNIX_SOCKETS
151151
static char **filter_lines_with_token(char **lines, char *token);
152152
#endif
153153
static char **readfile(char *path);
@@ -318,7 +318,7 @@ replace_token(char **lines, char *token, char *replacement)
318318
* a sort of poor man's grep -v
319319
*
320320
*/
321-
#ifdef WIN32
321+
#ifndef HAVE_UNIX_SOCKETS
322322
static char **
323323
filter_lines_with_token(char **lines, char *token)
324324
{
@@ -1124,10 +1124,10 @@ setup_config(void)
11241124

11251125
conflines = readfile(hba_file);
11261126

1127-
#ifdef WIN32
1128-
conflines = filter_lines_with_token(conflines,"@remove-line-for-win32@");
1127+
#ifndef HAVE_UNIX_SOCKETS
1128+
conflines = filter_lines_with_token(conflines,"@remove-line-for-nolocal@");
11291129
#else
1130-
conflines = replace_token(conflines,"@remove-line-for-win32@","");
1130+
conflines = replace_token(conflines,"@remove-line-for-nolocal@","");
11311131
#endif
11321132

11331133
#ifndef HAVE_IPV6

0 commit comments

Comments
 (0)