From e6e129a40e69af52a12deed91f68fff3569c51ce Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Sun, 19 May 2013 23:01:41 +0200 Subject: LDAP: Refactor account info handler into a tevent request The sdap account handler was a function with its own private callback that directly called the back end handlers. This patch refactors the handler into a new tevent request that the current sdap handler calls. This refactoring would allow the caller to specify a custom sdap connection for use by the handler and optionally retry the same request with another connection inside a single per-provider handler. No functional changes are present in this patch. --- src/providers/ldap/ldap_common.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/providers/ldap/ldap_common.h') diff --git a/src/providers/ldap/ldap_common.h b/src/providers/ldap/ldap_common.h index 8c608354..e22bff1e 100644 --- a/src/providers/ldap/ldap_common.h +++ b/src/providers/ldap/ldap_common.h @@ -96,6 +96,15 @@ void sdap_account_info_handler(struct be_req *breq); void sdap_handle_account_info(struct be_req *breq, struct sdap_id_ctx *ctx); int sdap_id_setup_tasks(struct sdap_id_ctx *ctx); +struct tevent_req * +sdap_handle_acct_req_send(TALLOC_CTX *mem_ctx, + struct be_req *breq, + struct be_acct_req *ar, + struct sdap_id_ctx *id_ctx); +errno_t +sdap_handle_acct_req_recv(struct tevent_req *req, + int *_dp_error, const char **_err); + /* auth */ void sdap_pam_auth_handler(struct be_req *breq); @@ -160,14 +169,6 @@ struct tevent_req *ldap_id_enumerate_send(struct tevent_context *ev, void sdap_mark_offline(struct sdap_id_ctx *ctx); -struct tevent_req *users_get_send(TALLOC_CTX *memctx, - struct tevent_context *ev, - struct sdap_id_ctx *ctx, - const char *name, - int filter_type, - int attrs_type); -int users_get_recv(struct tevent_req *req, int *dp_error_out); - struct tevent_req *groups_get_send(TALLOC_CTX *memctx, struct tevent_context *ev, struct sdap_id_ctx *ctx, -- cgit