Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
3b7c5aa5
Commit
3b7c5aa5
authored
21 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Fix some unprotected references to AF_UNIX ... wouldn't compile on
platforms without AF_UNIX sockets.
parent
e490ee80
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/libpq/hba.c
+11
-5
11 additions, 5 deletions
src/backend/libpq/hba.c
with
11 additions
and
5 deletions
src/backend/libpq/hba.c
+
11
−
5
View file @
3b7c5aa5
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.10
8
2003/0
7/26 13:50:02 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.10
9
2003/0
8/01 23:24:28 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -585,14 +585,13 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
if
(
*
error_p
)
goto
hba_syntax
;
/*
* Disallow auth methods that always need AF_INET sockets to work.
*/
/* Disallow auth methods that always need TCP/IP sockets to work */
if
(
port
->
auth_method
==
uaKrb4
||
port
->
auth_method
==
uaKrb5
)
goto
hba_syntax
;
if
(
port
->
raddr
.
addr
.
ss_family
!=
AF_UNIX
)
/* Does not match if connection isn't AF_UNIX */
if
(
!
IS_AF_UNIX
(
port
->
raddr
.
addr
.
ss_family
))
return
;
}
else
if
(
strcmp
(
token
,
"host"
)
==
0
...
...
@@ -1348,6 +1347,8 @@ ident_inet_done:
* Returns either true and the username put into "ident_user",
* or false if we were unable to determine the username.
*/
#ifdef HAVE_UNIX_SOCKETS
static
bool
ident_unix
(
int
sock
,
char
*
ident_user
)
{
...
...
@@ -1491,6 +1492,7 @@ ident_unix(int sock, char *ident_user)
#endif
}
#endif
/* HAVE_UNIX_SOCKETS */
/*
...
...
@@ -1515,10 +1517,14 @@ authident(hbaPort *port)
if
(
!
ident_inet
(
port
->
raddr
,
port
->
laddr
,
ident_user
))
return
STATUS_ERROR
;
break
;
#ifdef HAVE_UNIX_SOCKETS
case
AF_UNIX
:
if
(
!
ident_unix
(
port
->
sock
,
ident_user
))
return
STATUS_ERROR
;
break
;
#endif
default:
return
STATUS_ERROR
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment