diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-01-17 15:14:20 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-01-21 16:20:14 -0500 |
commit | 9917b96e31df3fa992d235a050ed1dc0e9939b3d (patch) | |
tree | 3b375372839cbf955d451e598b94fc0ec9c0fb8c /src/providers/data_provider_fo.c | |
parent | ca2bc5f78bd04a20085e709717c085a84ae120c0 (diff) | |
download | sssd-9917b96e31df3fa992d235a050ed1dc0e9939b3d.tar.gz sssd-9917b96e31df3fa992d235a050ed1dc0e9939b3d.tar.xz sssd-9917b96e31df3fa992d235a050ed1dc0e9939b3d.zip |
Allow fallback to SSSD domain
For backwards-compatibility with older versions of the SSSD (such
as 1.2.x), we need to be able to have our DNS SRV record lookup be
capable of falling back to using the SSSD domain name as the DNS
discovery domain.
This patch modifies our DNS lookups so that they behave as
follows:
If dns_discovery_domain is specified, it is considered
authoritative. No other discovery domains will be attempted.
If dns_discovery_domain is not specified, we first attempt to look
up the SRV records using the domain portion of the machine's
hostname. If this returns "NOTFOUND", we will try performing an
SRV record query using the SSSD domain name as the DNS discovery
domain.
https://fedorahosted.org/sssd/ticket/754
Diffstat (limited to 'src/providers/data_provider_fo.c')
-rw-r--r-- | src/providers/data_provider_fo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c index 0b4b24349..ddb348f64 100644 --- a/src/providers/data_provider_fo.c +++ b/src/providers/data_provider_fo.c @@ -284,7 +284,8 @@ int be_fo_add_srv_server(struct be_ctx *ctx, const char *service_name, /* Add the first protocol as the primary lookup */ ret = fo_add_srv_server(svc->fo_service, query_service, - domain, proto_table[proto], user_data); + domain, ctx->domain->name, + proto_table[proto], user_data); if (ret && ret != EEXIST) { DEBUG(1, ("Failed to add SRV lookup reference to failover service\n")); return ret; @@ -295,7 +296,8 @@ int be_fo_add_srv_server(struct be_ctx *ctx, const char *service_name, /* All the rest as fallback */ while (i != proto) { ret = fo_add_srv_server(svc->fo_service, query_service, - domain, proto_table[i], user_data); + domain, ctx->domain->name, + proto_table[i], user_data); if (ret && ret != EEXIST) { DEBUG(1, ("Failed to add SRV lookup reference to failover service\n")); return ret; |