summaryrefslogtreecommitdiff
path: root/src
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:03:49 -0500
commite840b9da42d696eb86307c641f5196f12ec4b9c4 (patch)
treec0777427b4194f470f0a920f6566fd12e1701bc1 /src
parent55fcd37c086f699db1aeac54a3df046b60755ff6 (diff)
downloadsssd-e840b9da42d696eb86307c641f5196f12ec4b9c4.tar.gz
sssd-e840b9da42d696eb86307c641f5196f12ec4b9c4.tar.bz2
sssd-e840b9da42d696eb86307c641f5196f12ec4b9c4.zip
IPA: Set the DNS discovery domain to match ipa_domain
https://fedorahosted.org/sssd/ticket/1217
Diffstat (limited to 'src')
-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 81c94f33..4c2c0b4a 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -247,8 +247,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;
@@ -263,7 +266,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 fc79d45b..b6b3db50 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 fc909dee..72d7c65c 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -958,6 +958,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;
@@ -1031,7 +1032,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 c2cb94b6..104d6131 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 ee2b56b6..69d1bc2b 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"));