summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-02-29 15:02:44 -0500
committerStephen Gallagher <sgallagh@redhat.com>2012-03-01 10:20:40 -0500
commitadf987941cc1a7b43678d4ab1443acb069db8444 (patch)
treeae2e6b683500918c7645a867cda5343c9cd64be1
parentb92478aae9a46cdc2407f7a95a1d70057053b981 (diff)
downloadsssd-adf987941cc1a7b43678d4ab1443acb069db8444.tar.gz
sssd-adf987941cc1a7b43678d4ab1443acb069db8444.tar.xz
sssd-adf987941cc1a7b43678d4ab1443acb069db8444.zip
IPA: Set the DNS discovery domain to match ipa_domain
https://fedorahosted.org/sssd/ticket/1217
-rw-r--r--src/providers/data_provider_fo.c9
-rw-r--r--src/providers/dp_backend.h7
-rw-r--r--src/providers/ipa/ipa_common.c4
-rw-r--r--src/providers/krb5/krb5_common.c2
-rw-r--r--src/providers/ldap/ldap_common.c3
5 files changed, 17 insertions, 8 deletions
diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c
index dd73e9d97..8d7cbbfd2 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -248,8 +248,11 @@ int be_fo_service_add_callback(TALLOC_CTX *memctx,
return EOK;
}
-int be_fo_add_srv_server(struct be_ctx *ctx, const char *service_name,
- const char *query_service, enum be_fo_protocol proto,
+int be_fo_add_srv_server(struct be_ctx *ctx,
+ const char *service_name,
+ const char *query_service,
+ const char *default_discovery_domain,
+ enum be_fo_protocol proto,
bool proto_fallback, void *user_data)
{
struct be_svc_data *svc;
@@ -264,7 +267,7 @@ int be_fo_add_srv_server(struct be_ctx *ctx, const char *service_name,
ret = confdb_get_string(ctx->cdb, svc, ctx->conf_path,
CONFDB_DOMAIN_DNS_DISCOVERY_NAME,
- NULL, &domain);
+ default_discovery_domain, &domain);
if (ret != EOK) {
DEBUG(1, ("Failed reading %s from confdb\n",
CONFDB_DOMAIN_DNS_DISCOVERY_NAME));
diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h
index fc79d45b3..b6b3db50a 100644
--- a/src/providers/dp_backend.h
+++ b/src/providers/dp_backend.h
@@ -195,8 +195,11 @@ int be_fo_service_add_callback(TALLOC_CTX *memctx,
struct be_ctx *ctx, const char *service_name,
be_svc_callback_fn_t *fn, void *private_data);
int be_fo_get_server_count(struct be_ctx *ctx, const char *service_name);
-int be_fo_add_srv_server(struct be_ctx *ctx, const char *service_name,
- const char *query_service, enum be_fo_protocol proto,
+int be_fo_add_srv_server(struct be_ctx *ctx,
+ const char *service_name,
+ const char *query_service,
+ const char *default_discovery_domain,
+ enum be_fo_protocol proto,
bool proto_fallback, void *user_data);
int be_fo_add_server(struct be_ctx *ctx, const char *service_name,
const char *server, int port, void *user_data);
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 8307f6abf..e95eeab77 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -938,6 +938,7 @@ int ipa_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx,
struct ipa_service *service;
char **list = NULL;
char *realm;
+ char *ipa_domain;
int ret;
int i;
@@ -1011,7 +1012,8 @@ int ipa_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx,
talloc_steal(service, list[i]);
if (be_fo_is_srv_identifier(list[i])) {
- ret = be_fo_add_srv_server(ctx, "IPA", "ldap",
+ ipa_domain = dp_opt_get_string(options->basic, IPA_DOMAIN);
+ ret = be_fo_add_srv_server(ctx, "IPA", "ldap", ipa_domain,
BE_FO_PROTO_TCP, false, NULL);
if (ret) {
DEBUG(0, ("Failed to add server\n"));
diff --git a/src/providers/krb5/krb5_common.c b/src/providers/krb5/krb5_common.c
index c2cb94b61..104d61311 100644
--- a/src/providers/krb5/krb5_common.c
+++ b/src/providers/krb5/krb5_common.c
@@ -516,7 +516,7 @@ int krb5_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx,
}
if (be_fo_is_srv_identifier(server_spec)) {
- ret = be_fo_add_srv_server(ctx, service_name, service_name,
+ ret = be_fo_add_srv_server(ctx, service_name, service_name, NULL,
BE_FO_PROTO_UDP, true, NULL);
if (ret) {
DEBUG(0, ("Failed to add server\n"));
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index 9a90814e6..d5dc4a0af 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -1388,7 +1388,8 @@ int sdap_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx,
goto done;
}
- ret = be_fo_add_srv_server(ctx, service_name, dns_service_name,
+ ret = be_fo_add_srv_server(ctx, service_name,
+ dns_service_name, NULL,
BE_FO_PROTO_TCP, false, srv_user_data);
if (ret) {
DEBUG(0, ("Failed to add server\n"));