diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-23 01:15:02 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-07 00:14:13 +0200 |
commit | 9aa117a93e315f790a1922d9ac7bd484878b621e (patch) | |
tree | 2ca931d7bc7a1a74d0f94033399578240dd8d387 /src/providers/ldap/ldap_id_netgroup.c | |
parent | e6e129a40e69af52a12deed91f68fff3569c51ce (diff) | |
download | sssd-9aa117a93e315f790a1922d9ac7bd484878b621e.tar.gz sssd-9aa117a93e315f790a1922d9ac7bd484878b621e.tar.xz sssd-9aa117a93e315f790a1922d9ac7bd484878b621e.zip |
LDAP: Pass in a connection to ID functions
Instead of using the default connection from the sdap_id_ctx, allow the
caller to specify which connection shall be used for this particular
request. Again, no functional change is present in this patch, just
another parameter is added.
Diffstat (limited to 'src/providers/ldap/ldap_id_netgroup.c')
-rw-r--r-- | src/providers/ldap/ldap_id_netgroup.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/providers/ldap/ldap_id_netgroup.c b/src/providers/ldap/ldap_id_netgroup.c index 6788a52e5..5f44c0a9b 100644 --- a/src/providers/ldap/ldap_id_netgroup.c +++ b/src/providers/ldap/ldap_id_netgroup.c @@ -34,6 +34,7 @@ struct ldap_netgroup_get_state { struct tevent_context *ev; struct sdap_id_ctx *ctx; struct sdap_id_op *op; + struct sdap_id_conn_ctx *conn; struct sysdb_ctx *sysdb; struct sss_domain_info *domain; @@ -54,9 +55,10 @@ static void ldap_netgroup_get_connect_done(struct tevent_req *subreq); static void ldap_netgroup_get_done(struct tevent_req *subreq); struct tevent_req *ldap_netgroup_get_send(TALLOC_CTX *memctx, - struct tevent_context *ev, - struct sdap_id_ctx *ctx, - const char *name) + struct tevent_context *ev, + struct sdap_id_ctx *ctx, + struct sdap_id_conn_ctx *conn, + const char *name) { struct tevent_req *req; struct ldap_netgroup_get_state *state; @@ -68,9 +70,10 @@ struct tevent_req *ldap_netgroup_get_send(TALLOC_CTX *memctx, state->ev = ev; state->ctx = ctx; + state->conn = conn; state->dp_error = DP_ERR_FATAL; - state->op = sdap_id_op_create(state, state->ctx->conn->conn_cache); + state->op = sdap_id_op_create(state, state->conn->conn_cache); if (!state->op) { DEBUG(2, ("sdap_id_op_create failed\n")); ret = ENOMEM; |