diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2012-03-29 04:39:42 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-04-24 09:19:42 -0400 |
commit | d3f2fd9cb21cc10dce663a2f7d0deda07074e44e (patch) | |
tree | d67ea0f96ea4b0878577c304ccf5b5d1bab515d0 | |
parent | 20d0bc6d587f346238062df4da5edfde815e59b1 (diff) | |
download | sssd-d3f2fd9cb21cc10dce663a2f7d0deda07074e44e.tar.gz sssd-d3f2fd9cb21cc10dce663a2f7d0deda07074e44e.tar.xz sssd-d3f2fd9cb21cc10dce663a2f7d0deda07074e44e.zip |
Add conn_name to allow different names for domains and connections
-rw-r--r-- | src/confdb/confdb.c | 1 | ||||
-rw-r--r-- | src/confdb/confdb.h | 1 | ||||
-rw-r--r-- | src/responder/common/responder_dp.c | 2 | ||||
-rw-r--r-- | src/responder/pam/pamsrv_dp.c | 2 | ||||
-rw-r--r-- | src/util/domain_info_utils.c | 4 |
5 files changed, 6 insertions, 4 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c index 04f02b5cc..0320797cd 100644 --- a/src/confdb/confdb.c +++ b/src/confdb/confdb.c @@ -727,6 +727,7 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb, ret = ENOMEM; goto done; } + domain->conn_name = domain->name; tmp = ldb_msg_find_attr_as_string(res->msgs[0], CONFDB_DOMAIN_ID_PROVIDER, diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h index 370970b81..d0b383e56 100644 --- a/src/confdb/confdb.h +++ b/src/confdb/confdb.h @@ -170,6 +170,7 @@ struct config_file_ctx; */ struct sss_domain_info { char *name; + char *conn_name; char *provider; int timeout; bool enumerate; diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c index a54c68d7e..4399736d6 100644 --- a/src/responder/common/responder_dp.c +++ b/src/responder/common/responder_dp.c @@ -641,7 +641,7 @@ sss_dp_internal_get_send(struct resp_ctx *rctx, * in some pathological cases it may happen that nss starts up before * dp connection code is actually able to establish a connection. */ - ret = sss_dp_get_domain_conn(rctx, dom->name, &be_conn); + ret = sss_dp_get_domain_conn(rctx, dom->conn_name, &be_conn); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, ("BUG: The Data Provider connection for %s is not available!", diff --git a/src/responder/pam/pamsrv_dp.c b/src/responder/pam/pamsrv_dp.c index 40d4f3031..afaca5937 100644 --- a/src/responder/pam/pamsrv_dp.c +++ b/src/responder/pam/pamsrv_dp.c @@ -92,7 +92,7 @@ int pam_dp_send_req(struct pam_auth_req *preq, int timeout) * dp connection code is actually able to establish a connection. */ res = sss_dp_get_domain_conn(preq->cctx->rctx, - preq->domain->name, &be_conn); + preq->domain->conn_name, &be_conn); if (res != EOK) { DEBUG(1, ("The Data Provider connection for %s is not available!" " This maybe a bug, it shouldn't happen!\n", preq->domain)); diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c index 5ee0aecef..e66bb154a 100644 --- a/src/util/domain_info_utils.c +++ b/src/util/domain_info_utils.c @@ -50,8 +50,8 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx, goto fail; } - dom->name = talloc_strdup(dom, parent->name); - if (dom->name == NULL) { + dom->conn_name = talloc_strdup(dom, parent->conn_name); + if (dom->conn_name == NULL) { DEBUG(SSSDBG_OP_FAILURE, ("Failed to copy connection name.\n")); goto fail; } |