Fix description: Ran valgrind with the MMR+SASL servers and
fixed leaks found in the test.
conn_connect could have overridden conn->ld without releasing
it. This patch releases it if necessary.
If DN normalization fails in slapi_sdn_get_dn, this patch
releases the locally strdup'ed string.
DN syntax attribute value is found in mods, it was normalized
and replaced in slapi_mods_insert_at. It leaked the pre-
noralized value. Instead, this patch normalizes mods in
do_modify and frees it when the modify is done.
modrdn_newsuperior_address.sdn was not release when the modrdn
operaton is done. This patch adds the release code.
There is an issue with the PAM plugin, that when it performs a
successful bind we actually return error 1 to plugins_call_func(), which
essentially causes the abort of the all plugin processing: the rest of
pre-op, the backend call, and all of post-op. PAM has completed the
bind and already returned the result, so it returns 1 to stop the DS
from doing the rest of bind op. Makes sense...
However, with the Account Policy plugin, when tracking the "last bind
time", binding thru PAM won't update the entry, even though the bind was
successful. This is because the successful PAM bind essentially aborted
all the pre-op and post-op plugins. I feel that we should still call
the post op plugins in this scenario. The pre-op plugins should still
be aborted, because the operation was already completed - there's
nothing to reject at that point.
So to get around plugins like this, I am proposing a new plugin pre-op
return code(either use 1, or -2). This return code implies that the
operation was fully completed, and that we should also process the post
op plugins - but do not send the operation to the backend.
So to the recap, the new return code says the operation was fully
completed by the plugin, but we still want to process just the post-op
I know this will impact documentation, there might be unforeseen issues,
and this is also a rare situation(only PAM plugin seems to behave like
this). Saying that, I still think its the valid solution to this type
of problem. It could also allow future plugins for be more
Please let me know your thoughts.