Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
7703e55c
Commit
7703e55c
authored
Sep 07, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the default pg_hba.conf include an entry for ::1 only if configure
set HAVE_IPV6. Per recent discussions.
parent
f4ed6509
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
10 deletions
+28
-10
configure
configure
+4
-0
configure.in
configure.in
+5
-2
src/Makefile.global.in
src/Makefile.global.in
+4
-1
src/backend/libpq/pg_hba.conf.sample
src/backend/libpq/pg_hba.conf.sample
+3
-3
src/bin/initdb/Makefile
src/bin/initdb/Makefile
+2
-1
src/bin/initdb/initdb.sh
src/bin/initdb/initdb.sh
+10
-3
No files found.
configure
View file @
7703e55c
...
@@ -11193,6 +11193,7 @@ fi
...
@@ -11193,6 +11193,7 @@ fi
HAVE_IPV6
=
no
echo
"
$as_me
:
$LINENO
: checking for struct sockaddr_in6"
>
&5
echo
"
$as_me
:
$LINENO
: checking for struct sockaddr_in6"
>
&5
echo
$ECHO_N
"checking for struct sockaddr_in6...
$ECHO_C
"
>
&6
echo
$ECHO_N
"checking for struct sockaddr_in6...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_type_struct_sockaddr_in6
+set
}
"
=
set
;
then
if
test
"
${
ac_cv_type_struct_sockaddr_in6
+set
}
"
=
set
;
then
...
@@ -11314,11 +11315,13 @@ cat >>confdefs.h <<\_ACEOF
...
@@ -11314,11 +11315,13 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_IPV6 1
#define HAVE_IPV6 1
_ACEOF
_ACEOF
HAVE_IPV6
=
yes
fi
fi
fi
fi
echo
"
$as_me
:
$LINENO
: checking for PS_STRINGS"
>
&5
echo
"
$as_me
:
$LINENO
: checking for PS_STRINGS"
>
&5
echo
$ECHO_N
"checking for PS_STRINGS...
$ECHO_C
"
>
&6
echo
$ECHO_N
"checking for PS_STRINGS...
$ECHO_C
"
>
&6
if
test
"
${
pgac_cv_var_PS_STRINGS
+set
}
"
=
set
;
then
if
test
"
${
pgac_cv_var_PS_STRINGS
+set
}
"
=
set
;
then
...
@@ -18286,6 +18289,7 @@ s,@python_configdir@,$python_configdir,;t t
...
@@ -18286,6 +18289,7 @@ s,@python_configdir@,$python_configdir,;t t
s,@python_includespec@,
$python_includespec
,;t t
s,@python_includespec@,
$python_includespec
,;t t
s,@python_libspec@,
$python_libspec
,;t t
s,@python_libspec@,
$python_libspec
,;t t
s,@LIBOBJS@,
$LIBOBJS
,;t t
s,@LIBOBJS@,
$LIBOBJS
,;t t
s,@HAVE_IPV6@,
$HAVE_IPV6
,;t t
s,@THREAD_CFLAGS@,
$THREAD_CFLAGS
,;t t
s,@THREAD_CFLAGS@,
$THREAD_CFLAGS
,;t t
s,@THREAD_LIBS@,
$THREAD_LIBS
,;t t
s,@THREAD_LIBS@,
$THREAD_LIBS
,;t t
s,@HAVE_POSIX_SIGNALS@,
$HAVE_POSIX_SIGNALS
,;t t
s,@HAVE_POSIX_SIGNALS@,
$HAVE_POSIX_SIGNALS
,;t t
...
...
configure.in
View file @
7703e55c
dnl Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
dnl $Header: /cvsroot/pgsql/configure.in,v 1.28
3 2003/09/01 23:01:49 petere
Exp $
dnl $Header: /cvsroot/pgsql/configure.in,v 1.28
4 2003/09/07 03:36:02 tgl
Exp $
dnl
dnl
dnl Developers, please strive to achieve this order:
dnl Developers, please strive to achieve this order:
dnl
dnl
...
@@ -832,12 +832,15 @@ AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproc
...
@@ -832,12 +832,15 @@ AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproc
AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
HAVE_IPV6=no
AC_CHECK_TYPE([struct sockaddr_in6],
AC_CHECK_TYPE([struct sockaddr_in6],
[AC_CHECK_FUNC(inet_ntop,
[AC_CHECK_FUNC(inet_ntop,
[AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if you have support for IPv6.])])],
[AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if you have support for IPv6.])
HAVE_IPV6=yes])],
[],
[],
[$ac_includes_default
[$ac_includes_default
#include <netinet/in.h>])
#include <netinet/in.h>])
AC_SUBST(HAVE_IPV6)
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
[AC_TRY_LINK(
[AC_TRY_LINK(
...
...
src/Makefile.global.in
View file @
7703e55c
# -*-makefile-*-
# -*-makefile-*-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.16
7 2003/09/01 23:01:49 petere
Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.16
8 2003/09/07 03:36:02 tgl
Exp $
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
# All PostgreSQL makefiles include this file and use the variables it sets,
...
@@ -263,6 +263,9 @@ host_tuple = @host@
...
@@ -263,6 +263,9 @@ host_tuple = @host@
host_os
=
@host_os@
host_os
=
@host_os@
host_cpu
=
@host_cpu@
host_cpu
=
@host_cpu@
# Make HAVE_IPV6 available for initdb script creation
HAVE_IPV6
=
@HAVE_IPV6@
# The HP-UX port makefile, for one, needs access to this symbol
# The HP-UX port makefile, for one, needs access to this symbol
HAVE_POSIX_SIGNALS
=
@HAVE_POSIX_SIGNALS@
HAVE_POSIX_SIGNALS
=
@HAVE_POSIX_SIGNALS@
...
...
src/backend/libpq/pg_hba.conf.sample
View file @
7703e55c
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
local all all trust
# IPv4-style local connections:
host all all 127.0.0.1 255.255.255.255 trust
host all all 127.0.0.1 255.255.255.255 trust
# IPv6-style local connections:
# uncomment this to support IPv6 loopback connections
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust
# host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust
src/bin/initdb/Makefile
View file @
7703e55c
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
# Portions Copyright (c) 1994, Regents of the University of California
#
#
# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.2
8 2002/09/03 21:45:43 petere
Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.2
9 2003/09/07 03:36:03 tgl
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -18,6 +18,7 @@ all: initdb
...
@@ -18,6 +18,7 @@ all: initdb
initdb
:
initdb.sh $(top_builddir)/src/Makefile.global
initdb
:
initdb.sh $(top_builddir)/src/Makefile.global
sed
-e
's/@VERSION@/
$(VERSION)
/g'
\
sed
-e
's/@VERSION@/
$(VERSION)
/g'
\
-e
's,@SHELL@,
$(SHELL)
,g'
\
-e
's,@SHELL@,
$(SHELL)
,g'
\
-e
's,@HAVE_IPV6@,
$(HAVE_IPV6)
,g'
\
-e
's,@bindir@,
$(bindir)
,g'
\
-e
's,@bindir@,
$(bindir)
,g'
\
-e
's,@datadir@,
$(datadir)
,g'
\
-e
's,@datadir@,
$(datadir)
,g'
\
$<
>
$@
$<
>
$@
...
...
src/bin/initdb/initdb.sh
View file @
7703e55c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
# Portions Copyright (c) 1994, Regents of the University of California
#
#
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.20
0 2003/08/26 15:38:25
tgl Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.20
1 2003/09/07 03:36:03
tgl Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -76,6 +76,7 @@ CMDNAME=`basename $0`
...
@@ -76,6 +76,7 @@ CMDNAME=`basename $0`
# Placed here during build
# Placed here during build
VERSION
=
'@VERSION@'
VERSION
=
'@VERSION@'
HAVE_IPV6
=
'@HAVE_IPV6@'
bindir
=
'@bindir@'
bindir
=
'@bindir@'
# Note that "datadir" is not the directory we're initializing, it's
# Note that "datadir" is not the directory we're initializing, it's
# merely how Autoconf names PREFIX/share.
# merely how Autoconf names PREFIX/share.
...
@@ -584,8 +585,6 @@ echo "$nconns"
...
@@ -584,8 +585,6 @@ echo "$nconns"
$ECHO_N
"creating configuration files... "
$ECHO_C
$ECHO_N
"creating configuration files... "
$ECHO_C
cp
"
$PG_HBA_SAMPLE
"
"
$PGDATA
"
/pg_hba.conf
||
exit_nicely
cp
"
$PG_IDENT_SAMPLE
"
"
$PGDATA
"
/pg_ident.conf
||
exit_nicely
sed
-e
"s/^#shared_buffers = 1000/shared_buffers =
$nbuffers
/"
\
sed
-e
"s/^#shared_buffers = 1000/shared_buffers =
$nbuffers
/"
\
-e
"s/^#max_connections = 100/max_connections =
$nconns
/"
\
-e
"s/^#max_connections = 100/max_connections =
$nconns
/"
\
-e
"s/^#lc_messages = 'C'/lc_messages = '
`
pg_getlocale MESSAGES
`
'/"
\
-e
"s/^#lc_messages = 'C'/lc_messages = '
`
pg_getlocale MESSAGES
`
'/"
\
...
@@ -593,6 +592,14 @@ sed -e "s/^#shared_buffers = 1000/shared_buffers = $nbuffers/" \
...
@@ -593,6 +592,14 @@ sed -e "s/^#shared_buffers = 1000/shared_buffers = $nbuffers/" \
-e
"s/^#lc_numeric = 'C'/lc_numeric = '
`
pg_getlocale NUMERIC
`
'/"
\
-e
"s/^#lc_numeric = 'C'/lc_numeric = '
`
pg_getlocale NUMERIC
`
'/"
\
-e
"s/^#lc_time = 'C'/lc_time = '
`
pg_getlocale TIME
`
'/"
\
-e
"s/^#lc_time = 'C'/lc_time = '
`
pg_getlocale TIME
`
'/"
\
"
$POSTGRESQL_CONF_SAMPLE
"
>
"
$PGDATA
"
/postgresql.conf
||
exit_nicely
"
$POSTGRESQL_CONF_SAMPLE
"
>
"
$PGDATA
"
/postgresql.conf
||
exit_nicely
if
[
"x
$HAVE_IPV6
"
=
xyes
]
then
cp
"
$PG_HBA_SAMPLE
"
"
$PGDATA
"
/pg_hba.conf
||
exit_nicely
else
sed
-e
"/ ::1 / s/^host/#host/"
\
"
$PG_HBA_SAMPLE
"
>
"
$PGDATA
"
/pg_hba.conf
||
exit_nicely
fi
cp
"
$PG_IDENT_SAMPLE
"
"
$PGDATA
"
/pg_ident.conf
||
exit_nicely
chmod
0600
"
$PGDATA
"
/pg_hba.conf
"
$PGDATA
"
/pg_ident.conf
\
chmod
0600
"
$PGDATA
"
/pg_hba.conf
"
$PGDATA
"
/pg_ident.conf
\
"
$PGDATA
"
/postgresql.conf
"
$PGDATA
"
/postgresql.conf
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment