Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
aba062ee
Commit
aba062ee
authored
Nov 21, 2003
by
Kurt Zeilenga
Browse files
(re)Add BIND4 support for NetBSD
parent
31f34d69
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/dnssrv.c
View file @
aba062ee
...
...
@@ -28,11 +28,6 @@
#include
<resolv.h>
#endif
/* Sometimes this is not defined. */
#ifndef T_SRV
#define T_SRV 33
#endif
/* T_SRV */
int
ldap_dn2domain
(
LDAP_CONST
char
*
dn_in
,
char
**
domainp
)
...
...
@@ -203,7 +198,16 @@ int ldap_domain2hostlist(
#endif
rc
=
LDAP_UNAVAILABLE
;
#ifdef NS_HFIXEDSZ
/* Bind 8/9 interface */
len
=
res_query
(
request
,
ns_c_in
,
ns_t_srv
,
reply
,
sizeof
(
reply
));
#else
/* Bind 4 interface */
# ifndef T_SRV
# define T_SRV 33
# endif
len
=
res_query
(
request
,
C_IN
,
T_SRV
,
reply
,
sizeof
(
reply
));
#endif
if
(
len
>=
0
)
{
unsigned
char
*
p
;
char
host
[
DNSBUFSIZ
];
...
...
@@ -213,7 +217,13 @@ int ldap_domain2hostlist(
/* Parse out query */
p
=
reply
;
#ifdef NS_HFIXEDSZ
/* Bind 8/9 interface */
p
+=
NS_HFIXEDSZ
;
#else
/* Bind 4 interface */
p
+=
HFIXEDSZ
;
#endif
status
=
dn_expand
(
reply
,
reply
+
len
,
p
,
host
,
sizeof
(
host
));
if
(
status
<
0
)
{
goto
out
;
...
...
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