summaryrefslogtreecommitdiff
path: root/src/providers/ad
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-04-04 12:28:15 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-04-10 15:36:56 +0200
commit1abdf56dcda5f6bed7b144e544c00dbdd501b3fc (patch)
treef71e257e87f75459c4717b7bcc92be3341c6532c /src/providers/ad
parente26a019fbac96b7697c180124fe1d4894962e3a0 (diff)
downloadsssd-1abdf56dcda5f6bed7b144e544c00dbdd501b3fc.tar.gz
sssd-1abdf56dcda5f6bed7b144e544c00dbdd501b3fc.tar.bz2
sssd-1abdf56dcda5f6bed7b144e544c00dbdd501b3fc.zip
DNS sites support - use SRV DNS lookup plugin in all providers
https://fedorahosted.org/sssd/ticket/1032 We set a plugin during an initialization of ID provider, which is an authoritative provider for a plugin choice. The plugin is set only once. When other provider is initalized (e.g. id = IPA, sudo = LDAP), we do not overwrite the plugin. Since sssm_*_id_init() is called from all module constructors, this patch relies on the fact, that ID provider is initialized before all other providers.
Diffstat (limited to 'src/providers/ad')
-rw-r--r--src/providers/ad/ad_init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/providers/ad/ad_init.c b/src/providers/ad/ad_init.c
index 2add74a2..087ec3c4 100644
--- a/src/providers/ad/ad_init.c
+++ b/src/providers/ad/ad_init.c
@@ -107,6 +107,7 @@ sssm_ad_id_init(struct be_ctx *bectx,
errno_t ret;
struct ad_id_ctx *ad_ctx;
struct sdap_id_ctx *sdap_ctx;
+ const char *hostname;
if (!ad_options) {
ret = common_ad_init(bectx);
@@ -175,6 +176,15 @@ sssm_ad_id_init(struct be_ctx *bectx,
goto done;
}
+ /* setup SRV lookup plugin */
+ hostname = dp_opt_get_string(ad_options->basic, AD_HOSTNAME);
+ ret = be_fo_set_dns_srv_lookup_plugin(bectx, hostname);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Unable to set SRV lookup plugin "
+ "[%d]: %s\n", ret, strerror(ret)));
+ goto done;
+ }
+
*ops = &ad_id_ops;
*pvt_data = ad_ctx;