summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-11-01 12:27:59 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-11-07 11:16:02 +0100
commit58f0025f9abfd3607813fecc282141acc698131c (patch)
tree49ae56742c6d9811a09e8a12ab7f571890070424 /src/providers/ldap
parentaa0e78c283c1a6e652e50f913f5e4e8d82e8554c (diff)
downloadsssd-58f0025f9abfd3607813fecc282141acc698131c.tar.gz
sssd-58f0025f9abfd3607813fecc282141acc698131c.tar.xz
sssd-58f0025f9abfd3607813fecc282141acc698131c.zip
free idmapped SIDs correctly
Resolves: https://fedorahosted.org/sssd/ticket/2133
Diffstat (limited to 'src/providers/ldap')
-rw-r--r--src/providers/ldap/ldap_id.c4
-rw-r--r--src/providers/ldap/sdap_async_initgroups_ad.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
index fad158533..793bc99eb 100644
--- a/src/providers/ldap/ldap_id.c
+++ b/src/providers/ldap/ldap_id.c
@@ -139,7 +139,7 @@ struct tevent_req *users_get_send(TALLOC_CTX *memctx,
attr_name = ctx->opts->user_map[SDAP_AT_USER_OBJECTSID].name;
ret = sss_filter_sanitize(state, sid, &clean_name);
- talloc_zfree(sid);
+ sss_idmap_free_sid(ctx->opts->idmap_ctx->map, sid);
if (ret != EOK) {
goto fail;
}
@@ -509,7 +509,7 @@ struct tevent_req *groups_get_send(TALLOC_CTX *memctx,
attr_name = ctx->opts->group_map[SDAP_AT_GROUP_OBJECTSID].name;
ret = sss_filter_sanitize(state, sid, &clean_name);
- talloc_zfree(sid);
+ sss_idmap_free_sid(ctx->opts->idmap_ctx->map, sid);
if (ret != EOK) {
goto fail;
}
diff --git a/src/providers/ldap/sdap_async_initgroups_ad.c b/src/providers/ldap/sdap_async_initgroups_ad.c
index a0841a799..aa72c8876 100644
--- a/src/providers/ldap/sdap_async_initgroups_ad.c
+++ b/src/providers/ldap/sdap_async_initgroups_ad.c
@@ -594,6 +594,8 @@ sdap_get_ad_tokengroups_initgroups_lookup_done(struct tevent_req *subreq)
in_transaction = false;
done:
+ sss_idmap_free_sid(state->opts->idmap_ctx->map, sid_str);
+
if (in_transaction) {
sret = sysdb_transaction_cancel(state->sysdb);
DEBUG(SSSDBG_FATAL_FAILURE,