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
bc8624b1
Commit
bc8624b1
authored
Oct 18, 2010
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support key word 'all' in host column of pg_hba.conf
parent
433c7a65
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
doc/src/sgml/client-auth.sgml
doc/src/sgml/client-auth.sgml
+1
-1
src/backend/libpq/hba.c
src/backend/libpq/hba.c
+7
-2
src/include/libpq/hba.h
src/include/libpq/hba.h
+2
-1
No files found.
doc/src/sgml/client-auth.sgml
View file @
bc8624b1
...
...
@@ -257,7 +257,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
</para>
<para>
You can also write
You can also write
<literal>all</literal> to match any IP address,
<literal>samehost</literal> to match any of the server's own IP
addresses, or <literal>samenet</literal> to match any address in any
subnet that the server is directly connected to.
...
...
src/backend/libpq/hba.c
View file @
bc8624b1
...
...
@@ -885,8 +885,11 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
}
token
=
lfirst
(
line_item
);
/* Is it equal to 'samehost' or 'samenet'? */
if
(
strcmp
(
token
,
"samehost
\n
"
)
==
0
)
if
(
strcmp
(
token
,
"all
\n
"
)
==
0
)
{
parsedline
->
ip_cmp_method
=
ipCmpAll
;
}
else
if
(
strcmp
(
token
,
"samehost
\n
"
)
==
0
)
{
/* Any IP on this host is allowed to connect */
parsedline
->
ip_cmp_method
=
ipCmpSameHost
;
...
...
@@ -1503,6 +1506,8 @@ check_hba(hbaPort *port)
continue
;
}
break
;
case
ipCmpAll
:
break
;
case
ipCmpSameHost
:
case
ipCmpSameNet
:
if
(
!
check_same_host_or_net
(
&
port
->
raddr
,
...
...
src/include/libpq/hba.h
View file @
bc8624b1
...
...
@@ -36,7 +36,8 @@ typedef enum IPCompareMethod
{
ipCmpMask
,
ipCmpSameHost
,
ipCmpSameNet
ipCmpSameNet
,
ipCmpAll
}
IPCompareMethod
;
typedef
enum
ConnType
...
...
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