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
ingo Voss
OpenLDAP
Commits
51c444b0
Commit
51c444b0
authored
Mar 26, 2021
by
Ondřej Kuzník
Committed by
Quanah Gibson-Mount
Mar 30, 2021
Browse files
ITS#8698 Defer policy checker cleanup if it's a pw extop
parent
0df931b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/ppolicy.c
View file @
51c444b0
...
...
@@ -2326,6 +2326,21 @@ ppolicy_mod_cb( Operation *op, SlapReply *rs )
return
SLAP_CB_CONTINUE
;
}
static
int
ppolicy_text_cleanup
(
Operation
*
op
,
SlapReply
*
rs
)
{
slap_callback
*
sc
=
op
->
o_callback
;
if
(
rs
->
sr_text
==
sc
->
sc_private
)
{
rs
->
sr_text
=
NULL
;
}
free
(
sc
->
sc_private
);
op
->
o_callback
=
sc
->
sc_next
;
op
->
o_tmpfree
(
sc
,
op
->
o_tmpmemctx
);
return
SLAP_CB_CONTINUE
;
}
static
int
ppolicy_modify
(
Operation
*
op
,
SlapReply
*
rs
)
{
...
...
@@ -3083,8 +3098,21 @@ return_results:
}
send_ldap_result
(
op
,
rs
);
if
(
free_txt
)
{
free
(
(
char
*
)
txt
);
rs
->
sr_text
=
NULL
;
if
(
is_pwdexop
)
{
slap_callback
*
cb
;
cb
=
op
->
o_tmpcalloc
(
sizeof
(
ppbind
)
+
sizeof
(
slap_callback
),
1
,
op
->
o_tmpmemctx
);
/* Setup a callback so we can free the text when sent */
cb
->
sc_cleanup
=
ppolicy_text_cleanup
;
cb
->
sc_private
=
(
void
*
)
txt
;
overlay_callback_after_backover
(
op
,
cb
,
1
);
}
else
{
if
(
rs
->
sr_text
==
txt
)
{
rs
->
sr_text
=
NULL
;
}
free
(
(
char
*
)
txt
);
}
}
if
(
send_ctrl
)
{
if
(
is_pwdexop
)
{
...
...
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