diff options
author | Pavel Březina <pbrezina@redhat.com> | 2013-09-02 13:36:25 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-09-17 16:13:32 +0200 |
commit | 786ccf0752cad7f0736ad499bb9a99725212b330 (patch) | |
tree | e8d58565f25c839d764afeaef02b4262eba87b4d /src/providers/ipa/ipa_idmap.c | |
parent | 3c999b2f12d39c9ecd3095ae3b5ed81c6413eb8c (diff) | |
download | sssd-786ccf0752cad7f0736ad499bb9a99725212b330.tar.gz sssd-786ccf0752cad7f0736ad499bb9a99725212b330.tar.xz sssd-786ccf0752cad7f0736ad499bb9a99725212b330.zip |
util: add sss_idmap_talloc[_free]
Remove code duplication.
Diffstat (limited to 'src/providers/ipa/ipa_idmap.c')
-rw-r--r-- | src/providers/ipa/ipa_idmap.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/providers/ipa/ipa_idmap.c b/src/providers/ipa/ipa_idmap.c index 69ab55c92..2f141f8ea 100644 --- a/src/providers/ipa/ipa_idmap.c +++ b/src/providers/ipa/ipa_idmap.c @@ -24,18 +24,7 @@ #include "util/util.h" #include "providers/ldap/sdap_idmap.h" #include "providers/ipa/ipa_common.h" - -static void * -ipa_idmap_talloc(size_t size, void *pvt) -{ - return talloc_size(pvt, size); -} - -static void -ipa_idmap_talloc_free(void *ptr, void *pvt) -{ - talloc_free(ptr); -} +#include "util/util_sss_idmap.h" errno_t ipa_idmap_find_new_domain(struct sdap_idmap_ctx *idmap_ctx, const char *dom_name, @@ -168,8 +157,8 @@ errno_t ipa_idmap_init(TALLOC_CTX *mem_ctx, idmap_ctx->find_new_domain = ipa_idmap_find_new_domain; /* Initialize the map */ - err = sss_idmap_init(ipa_idmap_talloc, idmap_ctx, - ipa_idmap_talloc_free, + err = sss_idmap_init(sss_idmap_talloc, idmap_ctx, + sss_idmap_talloc_free, &idmap_ctx->map); if (err != IDMAP_SUCCESS) { DEBUG(SSSDBG_CRIT_FAILURE, |