Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
94f33a94
Commit
94f33a94
authored
Dec 12, 2002
by
Kurt Zeilenga
Browse files
use reentrant gethostbynam
parent
df071b19
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/daemon.c
View file @
94f33a94
...
...
@@ -1599,19 +1599,25 @@ slapd_daemon_task(
)
{
#ifdef SLAPD_RLOOKUPS
if
(
use_reverse_lookup
)
{
struct
hostent
he
;
int
herr
;
char
*
ha
=
NULL
;
hp
=
NULL
;
# ifdef LDAP_PF_INET6
if
(
from
.
sa_addr
.
sa_family
==
AF_INET6
)
hp
=
gethostbyaddr
(
ldap_pvt_
gethostbyaddr
_a
(
(
char
*
)
&
(
from
.
sa_in6_addr
.
sin6_addr
),
sizeof
(
from
.
sa_in6_addr
.
sin6_addr
),
AF_INET6
);
AF_INET6
,
&
he
,
&
ha
,
&
hp
,
&
herr
);
else
# endif
/* LDAP_PF_INET6 */
hp
=
gethostbyaddr
(
ldap_pvt_
gethostbyaddr
_a
(
(
char
*
)
&
(
from
.
sa_in_addr
.
sin_addr
),
sizeof
(
from
.
sa_in_addr
.
sin_addr
),
AF_INET
);
AF_INET
,
&
he
,
&
ha
,
&
hp
,
&
herr
);
dnsname
=
hp
?
ldap_pvt_str2lower
(
hp
->
h_name
)
:
NULL
;
if
(
ha
)
ldap_memfree
(
ha
);
}
#else
dnsname
=
NULL
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment