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
Lukas However
OpenLDAP
Commits
4ef4c9eb
Commit
4ef4c9eb
authored
Sep 26, 2002
by
Kurt Zeilenga
Browse files
Return default referral if DN maps to empty domain.
parent
b4e1ea15
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-dnssrv/referral.c
View file @
4ef4c9eb
...
...
@@ -45,16 +45,14 @@ dnssrv_back_referrals(
return
LDAP_OTHER
;
}
if
(
ldap_dn2domain
(
dn
->
bv_val
,
&
domain
)
)
{
if
(
ldap_dn2domain
(
dn
->
bv_val
,
&
domain
)
||
domain
==
NULL
)
{
send_ldap_result
(
conn
,
op
,
LDAP_REFERRAL
,
NULL
,
NULL
,
default_referral
,
NULL
);
return
LDAP_REFERRAL
;
}
Debug
(
LDAP_DEBUG_TRACE
,
"DNSSRV: dn=
\"
%s
\"
-> domain=
\"
%s
\"\n
"
,
dn
->
bv_val
,
domain
==
NULL
?
""
:
domain
,
0
);
dn
->
bv_val
,
domain
,
0
);
if
(
(
rc
=
ldap_domain2hostlist
(
domain
,
&
hostlist
)
)
)
{
Debug
(
LDAP_DEBUG_TRACE
,
...
...
servers/slapd/back-dnssrv/search.c
View file @
4ef4c9eb
...
...
@@ -44,16 +44,14 @@ dnssrv_back_search(
assert
(
get_manageDSAit
(
op
)
);
if
(
ldap_dn2domain
(
dn
->
bv_val
,
&
domain
)
)
{
if
(
ldap_dn2domain
(
dn
->
bv_val
,
&
domain
)
||
domain
==
NULL
)
{
send_ldap_result
(
conn
,
op
,
LDAP_REFERRAL
,
NULL
,
NULL
,
default_referral
,
NULL
);
goto
done
;
}
Debug
(
LDAP_DEBUG_TRACE
,
"DNSSRV: dn=
\"
%s
\"
-> domain=
\"
%s
\"\n
"
,
dn
->
bv_len
?
dn
->
bv_val
:
""
,
domain
==
NULL
?
""
:
domain
,
0
);
dn
->
bv_len
?
dn
->
bv_val
:
""
,
domain
,
0
);
if
(
(
rc
=
ldap_domain2hostlist
(
domain
,
&
hostlist
)
)
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"DNSSRV: domain2hostlist returned %d
\n
"
,
...
...
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