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

Commitf3aec2c

Browse files
committed
Support "samehost" and "samenet" specifications in pg_hba.conf,
by enumerating the machine's IP interfaces to look for a match.Stef Walter
1 parentf7082f2 commitf3aec2c

File tree

13 files changed

+868
-116
lines changed

13 files changed

+868
-116
lines changed

‎configure

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9691,7 +9691,10 @@ done
96919691

96929692

96939693

9694-
for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
9694+
9695+
9696+
9697+
for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
96959698
do
96969699
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
96979700
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -9842,6 +9845,75 @@ fi
98429845
done
98439846

98449847

9848+
# On BSD, cpp test for net/if.h will fail unless sys/socket.h
9849+
# is included first.
9850+
9851+
for ac_header in net/if.h
9852+
do
9853+
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9854+
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9855+
$as_echo_n "checking for $ac_header... " >&6; }
9856+
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9857+
$as_echo_n "(cached) " >&6
9858+
else
9859+
cat >conftest.$ac_ext <<_ACEOF
9860+
/* confdefs.h. */
9861+
_ACEOF
9862+
cat confdefs.h >>conftest.$ac_ext
9863+
cat >>conftest.$ac_ext <<_ACEOF
9864+
/* end confdefs.h. */
9865+
$ac_includes_default
9866+
#ifdef HAVE_SYS_SOCKET_H
9867+
#include <sys/socket.h>
9868+
#endif
9869+
9870+
9871+
#include <$ac_header>
9872+
_ACEOF
9873+
rm -f conftest.$ac_objext
9874+
if { (ac_try="$ac_compile"
9875+
case "(($ac_try" in
9876+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9877+
*) ac_try_echo=$ac_try;;
9878+
esac
9879+
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9880+
$as_echo "$ac_try_echo") >&5
9881+
(eval "$ac_compile") 2>conftest.er1
9882+
ac_status=$?
9883+
grep -v '^ *+' conftest.er1 >conftest.err
9884+
rm -f conftest.er1
9885+
cat conftest.err >&5
9886+
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9887+
(exit $ac_status); } && {
9888+
test -z "$ac_c_werror_flag" ||
9889+
test ! -s conftest.err
9890+
} && test -s conftest.$ac_objext; then
9891+
eval "$as_ac_Header=yes"
9892+
else
9893+
$as_echo "$as_me: failed program was:" >&5
9894+
sed 's/^/| /' conftest.$ac_ext >&5
9895+
9896+
eval "$as_ac_Header=no"
9897+
fi
9898+
9899+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9900+
fi
9901+
ac_res=`eval 'as_val=${'$as_ac_Header'}
9902+
$as_echo "$as_val"'`
9903+
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9904+
$as_echo "$ac_res" >&6; }
9905+
as_val=`eval 'as_val=${'$as_ac_Header'}
9906+
$as_echo "$as_val"'`
9907+
if test "x$as_val" = x""yes; then
9908+
cat >>confdefs.h <<_ACEOF
9909+
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9910+
_ACEOF
9911+
9912+
fi
9913+
9914+
done
9915+
9916+
98459917
# At least on IRIX, cpp test for netinet/tcp.h will fail unless
98469918
# netinet/in.h is included first.
98479919

@@ -17327,7 +17399,8 @@ fi
1732717399

1732817400

1732917401

17330-
for ac_func in cbrt dlopen fcvt fdatasync getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
17402+
17403+
for ac_func in cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
1733117404
do
1733217405
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1733317406
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5

‎configure.in

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.611 2009/09/13 22:18:22 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.612 2009/10/01 01:58:57 tgl Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -969,7 +969,16 @@ AC_SUBST(OSSP_UUID_LIBS)
969969
##
970970

971971
dnl sys/socket.h is required by AC_FUNC_ACCEPT_ARGTYPES
972-
AC_CHECK_HEADERS([crypt.h dld.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h])
972+
AC_CHECK_HEADERS([crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h])
973+
974+
# On BSD, cpp test for net/if.h will fail unless sys/socket.h
975+
# is included first.
976+
AC_CHECK_HEADERS(net/if.h, [], [],
977+
[AC_INCLUDES_DEFAULT
978+
#ifdef HAVE_SYS_SOCKET_H
979+
#include <sys/socket.h>
980+
#endif
981+
])
973982

974983
# At least on IRIX, cpp test for netinet/tcp.h will fail unless
975984
# netinet/in.h is included first.
@@ -1148,7 +1157,7 @@ PGAC_VAR_INT_TIMEZONE
11481157
AC_FUNC_ACCEPT_ARGTYPES
11491158
PGAC_FUNC_GETTIMEOFDAY_1ARG
11501159

1151-
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
1160+
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasyncgetifaddrsgetpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
11521161

11531162
# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11541163
# by calling it, 2009-04-02

‎doc/src/sgml/client-auth.sgml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/client-auth.sgml,v 1.123 2009/06/24 13:46:32 mha Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/client-auth.sgml,v 1.124 2009/10/01 01:58:57 tgl Exp $ -->
22

33
<chapter id="client-authentication">
44
<title>Client Authentication</title>
@@ -225,6 +225,13 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
225225
<literal>/</literal>, and the CIDR mask length.
226226
</para>
227227

228+
<para>
229+
Instead of a <replaceable>CIDR-address</replaceable>, you can write
230+
<literal>samehost</literal> to match any of the server's own IP
231+
addresses, or <literal>samenet</literal> to match any address in any
232+
subnet that the server is directly connected to.
233+
</para>
234+
228235
<para>
229236
Typical examples of a <replaceable>CIDR-address</replaceable> are
230237
<literal>172.20.143.89/32</literal> for a single host, or

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp