On Mon, Jan 17, 2011 at 03:22:25PM -0500, Stephen Gallagher wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/17/2011 03:18 PM, Stephen Gallagher wrote:
> 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
>
Now with patch attached.
- --
Stephen Gallagher
RHCE 804006346421761
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora -
http://enigmail.mozdev.org/
iEYEARECAAYFAk00pQEACgkQeiVVYja6o6NK0gCePid9snWUsSYGaAu8swobSsBv
+ZQAnjyc2QJ02OS4doZp6hlbOnXVi8p4
=VHyL
-----END PGP SIGNATURE-----
int
fo_add_srv_server(struct fo_service *service, const char *srv,
- const char *dns_domain, const char *proto, void *user_data)
+ const char *dns_domain, const char *sssd_domain,
+ const char *proto, void *user_data)
{
struct fo_server *server;
@@ -539,11 +542,18 @@ fo_add_srv_server(struct fo_service *service, const char *srv,
return ENOMEM;
if (dns_domain) {
- server->srv_data->dns_domain = talloc_strdup(server->srv_data,
dns_domain);
- if (server->srv_data->dns_domain == NULL)
+ server->srv_data->discovery_domain = talloc_strdup(server->srv_data,
dns_domain);
+ if (server->srv_data->discovery_domain == NULL)
return ENOMEM;
+ server->srv_data->dns_domain =
+ server->srv_data->discovery_domain;
}
+ server->srv_data->sssd_domain =
+ talloc_strdup(server->srv_data, sssd_domain);
+ if (server->srv_data->sssd_domain == NULL)
+ return ENOMEM;
+
Would you mind to rename the dns_domain parameter of fo_add_srv_server()
to discovery_domain. This would help to not mix up dns_domain and
discovery_domain.
Otherwise the patch looks good.
bye,
Sumit