summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bordaz <tbordaz@redhat.com>2016-07-12 11:43:28 +0200
committerAlexander Bokovoy <abokovoy@redhat.com>2016-07-13 11:20:12 +0300
commit66177cbab545374ccc0bcacdd7a8ffea1ca7be6d (patch)
treecb957e25d5473a423a5dc6bf995445010ca4c183
parent11df81960498e3e570e2ba46a2e80b7549fd16c1 (diff)
downloadslapi-nis-66177cbab545374ccc0bcacdd7a8ffea1ca7be6d.tar.gz
slapi-nis-66177cbab545374ccc0bcacdd7a8ffea1ca7be6d.tar.xz
slapi-nis-66177cbab545374ccc0bcacdd7a8ffea1ca7be6d.zip
Double free on ldap entry during priming
During Schema-compat cache priming, If it exists an associated domain the entry returned by the internal search is freed twice. This was introduced in order for slapi-nis to resolve IPA groups with fully qualified suffix. To support SSSD 1.14+ change of logic to handle a default domain suffix.
-rw-r--r--src/back-sch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/back-sch.c b/src/back-sch.c
index cdd2b3c..0745329 100644
--- a/src/back-sch.c
+++ b/src/back-sch.c
@@ -284,15 +284,13 @@ backend_set_config_read_config(struct plugin_state *state, Slapi_Entry *e,
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
if (result == 0) {
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
- slapi_pblock_set(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, NULL);
for (j=0; entries[j] != NULL; j++) {
ret.associated_domain = slapi_entry_attr_get_charptr(entries[j], "associatedDomain");
- slapi_entry_free(entries[i]);
if (ret.associated_domain != NULL)
break;
}
- slapi_ch_free((void**)entries);
}
+ slapi_free_search_results_internal(pb);
}
slapi_pblock_destroy(pb);
pb = NULL;