summaryrefslogtreecommitdiff
path: root/src/providers/ldap/ldap_id_services.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-05-23 01:15:02 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-06-07 00:14:13 +0200
commit9aa117a93e315f790a1922d9ac7bd484878b621e (patch)
tree2ca931d7bc7a1a74d0f94033399578240dd8d387 /src/providers/ldap/ldap_id_services.c
parente6e129a40e69af52a12deed91f68fff3569c51ce (diff)
downloadsssd-9aa117a93e315f790a1922d9ac7bd484878b621e.tar.gz
sssd-9aa117a93e315f790a1922d9ac7bd484878b621e.tar.bz2
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_services.c')
-rw-r--r--src/providers/ldap/ldap_id_services.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/providers/ldap/ldap_id_services.c b/src/providers/ldap/ldap_id_services.c
index 5c3c53f2..2a3f104c 100644
--- a/src/providers/ldap/ldap_id_services.c
+++ b/src/providers/ldap/ldap_id_services.c
@@ -36,6 +36,7 @@ struct sdap_services_get_state {
struct sdap_id_op *op;
struct sysdb_ctx *sysdb;
struct sss_domain_info *domain;
+ struct sdap_id_conn_ctx *conn;
const char *name;
const char *protocol;
@@ -59,6 +60,7 @@ struct tevent_req *
services_get_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct sdap_id_ctx *id_ctx,
+ struct sdap_id_conn_ctx *conn,
const char *name,
const char *protocol,
int filter_type)
@@ -75,6 +77,7 @@ services_get_send(TALLOC_CTX *mem_ctx,
state->ev = ev;
state->id_ctx = id_ctx;
+ state->conn = conn;
state->dp_error = DP_ERR_FATAL;
state->sysdb = id_ctx->be->domain->sysdb;
state->domain = state->id_ctx->be->domain;
@@ -82,7 +85,7 @@ services_get_send(TALLOC_CTX *mem_ctx,
state->protocol = protocol;
state->filter_type = filter_type;
- state->op = sdap_id_op_create(state, state->id_ctx->conn->conn_cache);
+ state->op = sdap_id_op_create(state, state->conn->conn_cache);
if (!state->op) {
DEBUG(SSSDBG_MINOR_FAILURE, ("sdap_id_op_create failed\n"));
ret = ENOMEM;