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:02:19 +0200 |
commit | a473fb88e6015cf0ccbd2e9005c7e6acca18f452 (patch) | |
tree | 49546bec7a5fe3789fd841421af6786c35df87ab /src/responder/pac | |
parent | d0017ae54df06b1be7f6878e6f3bfeabe93c2290 (diff) | |
download | sssd-a473fb88e6015cf0ccbd2e9005c7e6acca18f452.tar.gz sssd-a473fb88e6015cf0ccbd2e9005c7e6acca18f452.tar.bz2 sssd-a473fb88e6015cf0ccbd2e9005c7e6acca18f452.zip |
util: add sss_idmap_talloc[_free]
Remove code duplication.
Diffstat (limited to 'src/responder/pac')
-rw-r--r-- | src/responder/pac/pacsrv.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/responder/pac/pacsrv.c b/src/responder/pac/pacsrv.c index 22f87cb7..a06d768b 100644 --- a/src/responder/pac/pacsrv.c +++ b/src/responder/pac/pacsrv.c @@ -42,6 +42,7 @@ #include "providers/data_provider.h" #include "monitor/monitor_interfaces.h" #include "sbus/sbus_client.h" +#include "util/util_sss_idmap.h" #define SSS_PAC_PIPE_NAME "pac" #define DEFAULT_PAC_FD_LIMIT 8192 @@ -105,16 +106,6 @@ static void pac_dp_reconnect_init(struct sbus_connection *conn, /* nss_shutdown(rctx); */ } -static void *idmap_talloc(size_t size, void *pvt) -{ - return talloc_size(pvt, size); -} - -static void idmap_free(void *ptr, void *pvt) -{ - talloc_free(ptr); -} - int pac_process_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct confdb_ctx *cdb) @@ -186,7 +177,7 @@ int pac_process_init(TALLOC_CTX *mem_ctx, pac_dp_reconnect_init, iter); } - err = sss_idmap_init(idmap_talloc, pac_ctx, idmap_free, + err = sss_idmap_init(sss_idmap_talloc, pac_ctx, sss_idmap_talloc_free, &pac_ctx->idmap_ctx); if (err != IDMAP_SUCCESS) { DEBUG(SSSDBG_FATAL_FAILURE, ("sss_idmap_init failed.\n")); |