From fd7673bc4eb06e647d8e11b603ff5482ca58d4f1 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 26 Jan 2010 06:45:31 +0000 Subject: [PATCH] Make the default pg_hba.conf and pg_ident.conf align at 8-character boundaries to make it easier to use with tabs. --- doc/src/sgml/backup.sgml | 6 +-- doc/src/sgml/client-auth.sgml | 54 +++++++++++++------------- src/backend/libpq/pg_hba.conf.sample | 8 ++-- src/backend/libpq/pg_ident.conf.sample | 2 +- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 4cb960b36a0..cfb70fb68d2 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1,4 +1,4 @@ - + Backup and Restore @@ -2046,8 +2046,8 @@ if (!triggered) # Allow the user "foo" from host 192.168.1.100 to connect to the primary # as a replication standby if the user's password is correctly supplied. # -# TYPE DATABASE USER CIDR-ADDRESS METHOD -host replication foo 192.168.1.100/32 md5 +# TYPE DATABASE USER CIDR-ADDRESS METHOD +host replication foo 192.168.1.100/32 md5 diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml index 85a24140009..9ceae856448 100644 --- a/doc/src/sgml/client-auth.sgml +++ b/doc/src/sgml/client-auth.sgml @@ -1,4 +1,4 @@ - + Client Authentication @@ -492,31 +492,31 @@ hostnossl database user # any database user name using Unix-domain sockets (the default for local # connections). # -# TYPE DATABASE USER CIDR-ADDRESS METHOD -local all all trust +# TYPE DATABASE USER CIDR-ADDRESS METHOD +local all all trust # The same using local loopback TCP/IP connections. # -# TYPE DATABASE USER CIDR-ADDRESS METHOD -host all all 127.0.0.1/32 trust +# TYPE DATABASE USER CIDR-ADDRESS METHOD +host all all 127.0.0.1/32 trust # The same as the previous line, but using a separate netmask column # -# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD -host all all 127.0.0.1 255.255.255.255 trust +# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD +host all all 127.0.0.1 255.255.255.255 trust # Allow any user from any host with IP address 192.168.93.x to connect # to database "postgres" as the same user name that ident reports for # the connection (typically the Unix user name). # -# TYPE DATABASE USER CIDR-ADDRESS METHOD -host postgres all 192.168.93.0/24 ident +# TYPE DATABASE USER CIDR-ADDRESS METHOD +host postgres all 192.168.93.0/24 ident # Allow any user from host 192.168.12.10 to connect to database # "postgres" if the user's password is correctly supplied. # -# TYPE DATABASE USER CIDR-ADDRESS METHOD -host postgres all 192.168.12.10/32 md5 +# TYPE DATABASE USER CIDR-ADDRESS METHOD +host postgres all 192.168.12.10/32 md5 # In the absence of preceding "host" lines, these two lines will # reject all connections from 192.168.54.1 (since that entry will be @@ -524,9 +524,9 @@ host postgres all 192.168.12.10/32 md5 # on the Internet. The zero mask means that no bits of the host IP # address are considered so it matches any host. # -# TYPE DATABASE USER CIDR-ADDRESS METHOD -host all all 192.168.54.1/32 reject -host all all 0.0.0.0/0 krb5 +# TYPE DATABASE USER CIDR-ADDRESS METHOD +host all all 192.168.54.1/32 reject +host all all 0.0.0.0/0 krb5 # Allow users from 192.168.x.x hosts to connect to any database, if # they pass the ident check. If, for example, ident says the user is @@ -534,8 +534,8 @@ host all all 0.0.0.0/0 krb5 # connection is allowed if there is an entry in pg_ident.conf for map # "omicron" that says "bryanh" is allowed to connect as "guest1". # -# TYPE DATABASE USER CIDR-ADDRESS METHOD -host all all 192.168.0.0/16 ident map=omicron +# TYPE DATABASE USER CIDR-ADDRESS METHOD +host all all 192.168.0.0/16 ident map=omicron # If these are the only three lines for local connections, they will # allow local users to connect only to their own databases (databases @@ -544,16 +544,16 @@ host all all 192.168.0.0/16 ident map=omicron # $PGDATA/admins contains a list of names of administrators. Passwords # are required in all cases. # -# TYPE DATABASE USER CIDR-ADDRESS METHOD -local sameuser all md5 -local all @admins md5 -local all +support md5 +# TYPE DATABASE USER CIDR-ADDRESS METHOD +local sameuser all md5 +local all @admins md5 +local all +support md5 # The last two lines above can be combined into a single line: -local all @admins,+support md5 +local all @admins,+support md5 # The database column can also use lists and file names: -local db1,db2,@demodbs all md5 +local db1,db2,@demodbs all md5 @@ -668,14 +668,14 @@ mymap /^(.*)@otherdomain\.com$ guest An example <filename>pg_ident.conf</> file -# MAPNAME SYSTEM-USERNAME PG-USERNAME +# MAPNAME SYSTEM-USERNAME PG-USERNAME -omicron bryanh bryanh -omicron ann ann +omicron bryanh bryanh +omicron ann ann # bob has user name robert on these machines -omicron robert bob +omicron robert bob # bryanh can also connect as guest1 -omicron bryanh guest1 +omicron bryanh guest1 diff --git a/src/backend/libpq/pg_hba.conf.sample b/src/backend/libpq/pg_hba.conf.sample index 54b369d5f22..7d327ac6a69 100644 --- a/src/backend/libpq/pg_hba.conf.sample +++ b/src/backend/libpq/pg_hba.conf.sample @@ -67,11 +67,11 @@ @authcomment@ -# TYPE DATABASE USER CIDR-ADDRESS METHOD +# TYPE DATABASE USER CIDR-ADDRESS METHOD @remove-line-for-nolocal@# "local" is for Unix domain socket connections only -@remove-line-for-nolocal@local all all @authmethod@ +@remove-line-for-nolocal@local all all @authmethod@ # IPv4 local connections: -host all all 127.0.0.1/32 @authmethod@ +host all all 127.0.0.1/32 @authmethod@ # IPv6 local connections: -host all all ::1/128 @authmethod@ +host all all ::1/128 @authmethod@ diff --git a/src/backend/libpq/pg_ident.conf.sample b/src/backend/libpq/pg_ident.conf.sample index 16ef76a2502..c5298d7760a 100644 --- a/src/backend/libpq/pg_ident.conf.sample +++ b/src/backend/libpq/pg_ident.conf.sample @@ -37,4 +37,4 @@ # Put your actual configuration here # ---------------------------------- -# MAPNAME SYSTEM-USERNAME PG-USERNAME +# MAPNAME SYSTEM-USERNAME PG-USERNAME