Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
orbea -
OpenLDAP
Commits
38ea26b3
Commit
38ea26b3
authored
Feb 23, 2021
by
Ondřej Kuzník
Committed by
Quanah Gibson-Mount
Feb 24, 2021
Browse files
ITS#7262 Retrieve the policy from the correct backend
parent
0eacc4a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/ppolicy.c
View file @
38ea26b3
...
...
@@ -863,6 +863,7 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
{
slap_overinst
*
on
=
(
slap_overinst
*
)
op
->
o_bd
->
bd_info
;
pp_info
*
pi
=
on
->
on_bi
.
bi_private
;
BackendDB
*
bd
,
*
bd_orig
=
op
->
o_bd
;
Attribute
*
a
;
BerVarray
vals
;
int
rc
=
LDAP_SUCCESS
;
...
...
@@ -889,9 +890,14 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
}
}
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
->
on_info
;
op
->
o_bd
=
bd
=
select_backend
(
vals
,
0
);
if
(
op
->
o_bd
==
NULL
)
{
op
->
o_bd
=
bd_orig
;
goto
defaultpol
;
}
rc
=
be_entry_get_rw
(
op
,
vals
,
NULL
,
NULL
,
0
,
&
pe
);
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
;
op
->
o_bd
=
bd_orig
;
if
(
rc
)
goto
defaultpol
;
...
...
@@ -1010,17 +1016,17 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
pp
->
pwdMaxDelay
=
pp
->
pwdMinDelay
;
}
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
->
on_info
;
op
->
o_bd
=
bd
;
be_entry_release_r
(
op
,
pe
);
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
;
op
->
o_bd
=
bd_orig
;
return
LDAP_SUCCESS
;
defaultpol:
if
(
pe
)
{
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
->
on_info
;
op
->
o_bd
=
bd
;
be_entry_release_r
(
op
,
pe
);
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
;
op
->
o_bd
=
bd_orig
;
}
if
(
rc
&&
!
BER_BVISNULL
(
vals
)
)
{
...
...
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