[SSSD] [PATCH] IPA: Do not enable IPA sites in server mode
Jakub Hrozek
jhrozek at redhat.com
Wed Sep 25 09:37:37 UTC 2013
I realized this might be a nice chance when I was working on #2079. In
the server mode, the IPA sites should be ignored, I think. But I don't
think this patch is too important as IPA sites are still only
experimental patches.
-------------- next part --------------
>From 348ce5c744ad42f8481ffa0a8f7a13e026c2b99f Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Wed, 25 Sep 2013 11:36:02 +0200
Subject: [PATCH] IPA: Do not enable IPA sites in server mode
---
src/providers/ipa/ipa_init.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/providers/ipa/ipa_init.c b/src/providers/ipa/ipa_init.c
index f5e482344f405abd453bf54ed24110cebc65fb65..d787e0c45c18d6183e392ea515131cc61d39a7cb 100644
--- a/src/providers/ipa/ipa_init.c
+++ b/src/providers/ipa/ipa_init.c
@@ -242,20 +242,7 @@ int sssm_ipa_id_init(struct be_ctx *bectx,
hostname = dp_opt_get_string(ipa_options->basic, IPA_HOSTNAME);
server_mode = dp_opt_get_bool(ipa_options->basic, IPA_SERVER_MODE);
- if (dp_opt_get_bool(ipa_options->basic, IPA_ENABLE_DNS_SITES)) {
- /* use IPA plugin */
- ipa_domain = dp_opt_get_string(ipa_options->basic, IPA_DOMAIN);
- srv_ctx = ipa_srv_plugin_ctx_init(bectx, bectx->be_res->resolv,
- hostname, ipa_domain);
- if (srv_ctx == NULL) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Out of memory?\n"));
- ret = ENOMEM;
- goto done;
- }
-
- be_fo_set_srv_lookup_plugin(bectx, ipa_srv_plugin_send,
- ipa_srv_plugin_recv, srv_ctx, "IPA");
- } else if (server_mode == true) {
+ if (server_mode == true) {
/* In server mode we need to ignore the dns_discovery_domain if set
* and only discover servers based on AD domains
*/
@@ -280,6 +267,19 @@ int sssm_ipa_id_init(struct be_ctx *bectx,
goto done;
}
}
+ } else if (dp_opt_get_bool(ipa_options->basic, IPA_ENABLE_DNS_SITES)) {
+ /* use IPA plugin */
+ ipa_domain = dp_opt_get_string(ipa_options->basic, IPA_DOMAIN);
+ srv_ctx = ipa_srv_plugin_ctx_init(bectx, bectx->be_res->resolv,
+ hostname, ipa_domain);
+ if (srv_ctx == NULL) {
+ DEBUG(SSSDBG_FATAL_FAILURE, ("Out of memory?\n"));
+ ret = ENOMEM;
+ goto done;
+ }
+
+ be_fo_set_srv_lookup_plugin(bectx, ipa_srv_plugin_send,
+ ipa_srv_plugin_recv, srv_ctx, "IPA");
} else {
/* fall back to standard plugin on clients. */
ret = be_fo_set_dns_srv_lookup_plugin(bectx, hostname);
--
1.8.3.1
More information about the sssd-devel
mailing list