Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2004-10-06 09:13:10 +0000
committerBruce Momjian2004-10-06 09:13:10 +0000
commit4542581bf1120c0ce706ee6029a723abc8147d60 (patch)
tree4e86018e25cfb2c0c6873fd509a2d10b022dcd59
parentc93872d891239b13b3c0c985e3f69bfa5a3cd8a3 (diff)
Adjustment to test on unix domain socket variable for pg_hba.conf
default settings, rather than just Win32.
-rw-r--r--src/backend/libpq/pg_hba.conf.sample4
-rw-r--r--src/bin/initdb/initdb.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/libpq/pg_hba.conf.sample b/src/backend/libpq/pg_hba.conf.sample
index d3213d94587..063fc5fddea 100644
--- a/src/backend/libpq/pg_hba.conf.sample
+++ b/src/backend/libpq/pg_hba.conf.sample
@@ -60,8 +60,8 @@
# TYPE DATABASE USER CIDR-ADDRESS METHOD
-@remove-line-for-win32@# "local" is for Unix domain socket connections only
-@remove-line-for-win32@local all all @authmethod@
+@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
+@remove-line-for-nolocal@local all all @authmethod@
# IPv4 local connections:
host all all 127.0.0.1/32 @authmethod@
# IPv6 local connections:
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index ab61221b1f9..9e7bd70a30a 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -39,7 +39,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.55 2004/10/06 09:01:18 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.56 2004/10/06 09:13:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -147,7 +147,7 @@ char backend_exec[MAXPGPATH];
static void *xmalloc(size_t size);
static char *xstrdup(const char *s);
static char **replace_token(char **lines, char *token, char *replacement);
-#ifdef WIN32
+#ifndef HAVE_UNIX_SOCKETS
static char **filter_lines_with_token(char **lines, char *token);
#endif
static char **readfile(char *path);
@@ -318,7 +318,7 @@ replace_token(char **lines, char *token, char *replacement)
* a sort of poor man's grep -v
*
*/
-#ifdef WIN32
+#ifndef HAVE_UNIX_SOCKETS
static char **
filter_lines_with_token(char **lines, char *token)
{
@@ -1124,10 +1124,10 @@ setup_config(void)
conflines = readfile(hba_file);
-#ifdef WIN32
- conflines = filter_lines_with_token(conflines,"@remove-line-for-win32@");
+#ifndef HAVE_UNIX_SOCKETS
+ conflines = filter_lines_with_token(conflines,"@remove-line-for-nolocal@");
#else
- conflines = replace_token(conflines,"@remove-line-for-win32@","");
+ conflines = replace_token(conflines,"@remove-line-for-nolocal@","");
#endif
#ifndef HAVE_IPV6