Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
James Lowden
OpenLDAP
Commits
dd82fa53
Commit
dd82fa53
authored
Sep 20, 2020
by
Howard Chu
Browse files
ITS#9353 fix monitor_back_register_database for empty suffix DB
Use the correct database entry instead of the frontendDB entry
parent
bc021bb2
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-monitor/back-monitor.h
View file @
dd82fa53
...
...
@@ -72,6 +72,7 @@ typedef struct monitor_entry_t {
/* NOTE: flags with 0xF0000000U mask are reserved for subsystem internals */
struct
monitor_callback_t
*
mp_cb
;
/* callback sequence */
void
*
mp_private
;
}
monitor_entry_t
;
struct
entry_limbo_t
;
/* in init.c */
...
...
servers/slapd/back-monitor/database.c
View file @
dd82fa53
...
...
@@ -346,6 +346,7 @@ monitor_subsys_database_init_one(
mp
->
mp_info
=
ms
;
mp
->
mp_flags
=
ms
->
mss_flags
|
MONITOR_F_SUB
;
mp
->
mp_private
=
be
;
if
(
monitor_cache_add
(
mi
,
e
)
)
{
Debug
(
LDAP_DEBUG_ANY
,
...
...
@@ -444,31 +445,13 @@ monitor_back_register_database_and_overlay(
mp
=
(
monitor_entry_t
*
)
e_database
->
e_private
;
for
(
i
=
-
1
,
ep
=
&
mp
->
mp_children
;
*
ep
;
i
++
)
{
Attribute
*
a
;
a
=
attr_find
(
(
*
ep
)
->
e_attrs
,
slap_schema
.
si_ad_namingContexts
);
if
(
a
)
{
int
j
,
k
;
/* FIXME: RFC 4512 defines namingContexts without an
* equality matching rule, making comparisons
* like this one tricky. We use a_vals and
* be_suffix instead for now.
*/
for
(
j
=
0
;
!
BER_BVISNULL
(
&
a
->
a_vals
[
j
]
);
j
++
)
{
for
(
k
=
0
;
!
BER_BVISNULL
(
&
be
->
be_suffix
[
k
]
);
k
++
)
{
if
(
dn_match
(
&
a
->
a_vals
[
j
],
&
be
->
be_suffix
[
k
]
)
)
{
rc
=
0
;
goto
done
;
}
}
}
}
mp
=
(
monitor_entry_t
*
)(
*
ep
)
->
e_private
;
assert
(
mp
!=
NULL
);
if
(
mp
->
mp_private
==
be
->
bd_self
)
{
rc
=
0
;
goto
done
;
}
ep
=
&
mp
->
mp_next
;
}
...
...
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