Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
1bc5314d
Commit
1bc5314d
authored
May 26, 2000
by
Kurt Zeilenga
Browse files
Fix DNSSRV initialization bug
parent
b8af4a67
Changes
2
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/dnssrv.c
View file @
1bc5314d
...
...
@@ -61,12 +61,15 @@ int ldap_dn2domain(
return
-
3
;
}
#define LDAP_DC "dc="
#define LDAP_DCOID "0.9.2342.19200300.100.1.25="
if
(
rdn
[
1
]
==
NULL
)
{
/*
* single-valued RDN
*/
char
*
dc
;
/* single RDN */
#define LDAP_DC "dc="
#define LDAP_DCOID "0.9.2342.19200300.100.1.25="
if
(
strncasecmp
(
rdn
[
0
],
LDAP_DC
,
sizeof
(
LDAP_DC
)
-
1
)
==
0
)
...
...
@@ -106,6 +109,8 @@ int ldap_dn2domain(
return
-
5
;
}
if
(
domain
==
NULL
)
ndomain
[
0
]
=
'\0'
;
strcat
(
ndomain
,
dc
);
strcat
(
ndomain
,
"."
);
...
...
@@ -114,11 +119,20 @@ int ldap_dn2domain(
}
}
/*
* multi-valued RDN or fall thru
*/
LDAP_VFREE
(
rdn
);
LDAP_FREE
(
domain
);
domain
=
NULL
;
}
if
(
domain
!=
NULL
&&
*
domain
==
'\0'
)
{
LDAP_FREE
(
domain
);
domain
=
NULL
;
}
*
domainp
=
domain
;
return
0
;
}
...
...
servers/slapd/back-dnssrv/request.c
View file @
1bc5314d
...
...
@@ -40,7 +40,7 @@ dnssrv_back_request(
dn
==
NULL
?
""
:
dn
,
domain
==
NULL
?
""
:
domain
,
0
);
if
(
rc
=
ldap_domain2hostlist
(
domain
,
&
hostlist
)
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"DNSSRV: domain2hostlist returned %d
\n
"
,
rc
,
0
,
0
);
...
...
Write
Preview
Supports
Markdown
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