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
467839df
Commit
467839df
authored
Jun 14, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle threading in two more gethostbyname calls.
parent
a16a0314
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
src/interfaces/libpq/fe-secure.c
src/interfaces/libpq/fe-secure.c
+11
-2
src/port/getaddrinfo.c
src/port/getaddrinfo.c
+10
-2
No files found.
src/interfaces/libpq/fe-secure.c
View file @
467839df
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.2
4 2003/06/14 17:49:54
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.2
5 2003/06/14 18:20:32
momjian Exp $
*
* NOTES
* The client *requires* a valid server certificate. Since
...
...
@@ -453,8 +453,17 @@ verify_peer(PGconn *conn)
if
(
addr
.
sa_family
==
AF_UNIX
)
return
0
;
{
struct
hostent
hpstr
;
char
buf
[
BUFSIZ
];
int
herrno
=
0
;
pqGethostbyname
(
conn
->
peer_cn
,
&
hpstr
,
buf
,
sizeof
(
buf
),
&
h
,
&
herrno
);
}
/* what do we know about the peer's common name? */
if
((
h
=
gethostbyname
(
conn
->
peer_cn
))
=
=
NULL
)
if
((
h
==
NULL
)
{
printfPQExpBuffer
(
&
conn
->
errorMessage
,
libpq_gettext
(
"could not get information about host (%s): %s
\n
"
),
...
...
src/port/getaddrinfo.c
View file @
467839df
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/port/getaddrinfo.c,v 1.
7 2003/06/12 08:15:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/port/getaddrinfo.c,v 1.
8 2003/06/14 18:20:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -84,8 +84,16 @@ getaddrinfo(const char *node, const char *service,
else
{
struct
hostent
*
hp
;
#ifdef FRONTEND
struct
hostent
hpstr
;
char
buf
[
BUFSIZ
];
int
herrno
=
0
;
pqGethostbyname
(
node
,
&
hpstr
,
buf
,
sizeof
(
buf
),
&
hp
,
&
herrno
);
#else
hp
=
gethostbyname
(
node
);
#endif
if
(
hp
==
NULL
)
{
switch
(
h_errno
)
...
...
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