summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap_sudo.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-05-21 17:18:03 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-06-07 00:14:12 +0200
commitdcb44c39dda9699cdd6488fd116a51ced0687de3 (patch)
tree71b463b2c64a5de1f7c0983d74700b264892bb96 /src/providers/ldap/sdap_sudo.c
parent7119f0c483049a8850d3075c0b1062f35200a538 (diff)
downloadsssd-dcb44c39dda9699cdd6488fd116a51ced0687de3.tar.gz
sssd-dcb44c39dda9699cdd6488fd116a51ced0687de3.tar.bz2
sssd-dcb44c39dda9699cdd6488fd116a51ced0687de3.zip
LDAP: sdap_id_ctx might contain several connections
With some LDAP server implementations, one server might provide different "views" of the identites on different ports. One example is the Active Directory Global catalog. The provider would contact different view depending on which operation it is performing and against which SSSD domain. At the same time, these views run on the same server, which means the same server options, enumeration, cleanup or Kerberos service should be used. So instead of using several different failover ports or several instances of sdap_id_ctx, this patch introduces a new "struct sdap_id_conn_ctx" that contains the connection cache to the particular view and an instance of "struct sdap_options" that contains the URI. No functional changes are present in this patch, currently all providers use a single connection. Multiple connections will be used later in the upcoming patches.
Diffstat (limited to 'src/providers/ldap/sdap_sudo.c')
-rw-r--r--src/providers/ldap/sdap_sudo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index 3472da67..315f254a 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -508,7 +508,7 @@ void sdap_sudo_handler(struct be_req *be_req)
case BE_REQ_SUDO_RULES:
DEBUG(SSSDBG_TRACE_FUNC, ("Issuing a refresh of specific sudo rules\n"));
req = sdap_sudo_rules_refresh_send(be_req, sudo_ctx, id_ctx->be,
- id_ctx->opts, id_ctx->conn_cache,
+ id_ctx->opts, id_ctx->conn->conn_cache,
sudo_req->rules);
break;
default:
@@ -585,7 +585,7 @@ static struct tevent_req *sdap_sudo_full_refresh_send(TALLOC_CTX *mem_ctx,
DEBUG(SSSDBG_TRACE_FUNC, ("Issuing a full refresh of sudo rules\n"));
subreq = sdap_sudo_refresh_send(state, id_ctx->be, id_ctx->opts,
- id_ctx->conn_cache,
+ id_ctx->conn->conn_cache,
ldap_full_filter, sysdb_filter);
if (subreq == NULL) {
ret = ENOMEM;
@@ -901,7 +901,7 @@ static struct tevent_req *sdap_sudo_smart_refresh_send(TALLOC_CTX *mem_ctx,
"(USN > %s)\n", (usn == NULL ? "0" : usn)));
subreq = sdap_sudo_refresh_send(state, id_ctx->be, id_ctx->opts,
- id_ctx->conn_cache,
+ id_ctx->conn->conn_cache,
ldap_full_filter, NULL);
if (subreq == NULL) {
ret = ENOMEM;