|
|
2fc102 |
From 8751aace6de14f3782765a89555b65e991f340a0 Mon Sep 17 00:00:00 2001
|
|
|
2fc102 |
From: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
2fc102 |
Date: Tue, 3 Dec 2013 15:25:25 +0100
|
|
|
2fc102 |
Subject: [PATCH 13/15] SUBDOMAINS: Reuse cached results if DP is offline
|
|
|
2fc102 |
|
|
|
2fc102 |
If Data Provider was unable to refresh the subdomain list, the
|
|
|
2fc102 |
sss_domain_info->subdomains list was NULL. Which meant that no DP
|
|
|
2fc102 |
request matched any known domain and hence offline authentication was
|
|
|
2fc102 |
not working correctly.
|
|
|
2fc102 |
|
|
|
2fc102 |
Resolves:
|
|
|
2fc102 |
https://fedorahosted.org/sssd/ticket/2168
|
|
|
2fc102 |
---
|
|
|
2fc102 |
src/providers/ad/ad_subdomains.c | 7 +++++++
|
|
|
2fc102 |
src/providers/ipa/ipa_subdomains.c | 8 ++++++--
|
|
|
2fc102 |
2 files changed, 13 insertions(+), 2 deletions(-)
|
|
|
2fc102 |
|
|
|
2fc102 |
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
|
|
|
2fc102 |
index 9911dfe0f4fda6749fa6dd3f15b1c04a36964ca4..18414523096ba0e53261415551eea57b4b2758b2 100644
|
|
|
2fc102 |
--- a/src/providers/ad/ad_subdomains.c
|
|
|
2fc102 |
+++ b/src/providers/ad/ad_subdomains.c
|
|
|
2fc102 |
@@ -650,5 +650,12 @@ int ad_subdom_init(struct be_ctx *be_ctx,
|
|
|
2fc102 |
return EFAULT;
|
|
|
2fc102 |
}
|
|
|
2fc102 |
|
|
|
2fc102 |
+ ret = sysdb_update_subdomains(be_ctx->domain);
|
|
|
2fc102 |
+ if (ret != EOK) {
|
|
|
2fc102 |
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Could not load the list of subdomains. "
|
|
|
2fc102 |
+ "Users from trusted domains might not be resolved correctly\n"));
|
|
|
2fc102 |
+ /* Ignore this error and try to discover the subdomains later */
|
|
|
2fc102 |
+ }
|
|
|
2fc102 |
+
|
|
|
2fc102 |
return EOK;
|
|
|
2fc102 |
}
|
|
|
2fc102 |
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
|
|
|
2fc102 |
index 4f7627eddb9c54d68e45be876157057f3c30b422..416e21913be8e991c9f496ff2b54f238b602f304 100644
|
|
|
2fc102 |
--- a/src/providers/ipa/ipa_subdomains.c
|
|
|
2fc102 |
+++ b/src/providers/ipa/ipa_subdomains.c
|
|
|
2fc102 |
@@ -809,8 +809,6 @@ static void ipa_subdomains_get_conn_done(struct tevent_req *req)
|
|
|
2fc102 |
DEBUG(SSSDBG_MINOR_FAILURE,
|
|
|
2fc102 |
("No IPA server is available, cannot get the "
|
|
|
2fc102 |
"subdomain list while offline\n"));
|
|
|
2fc102 |
-
|
|
|
2fc102 |
-/* FIXME: return saved results ?? */
|
|
|
2fc102 |
} else {
|
|
|
2fc102 |
DEBUG(SSSDBG_OP_FAILURE,
|
|
|
2fc102 |
("Failed to connect to IPA server: [%d](%s)\n",
|
|
|
2fc102 |
@@ -1291,6 +1289,12 @@ int ipa_subdom_init(struct be_ctx *be_ctx,
|
|
|
2fc102 |
DEBUG(SSSDBG_MINOR_FAILURE, ("Failed to add subdom offline callback"));
|
|
|
2fc102 |
}
|
|
|
2fc102 |
|
|
|
2fc102 |
+ ret = sysdb_update_subdomains(be_ctx->domain);
|
|
|
2fc102 |
+ if (ret != EOK) {
|
|
|
2fc102 |
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Could not load the list of subdomains. "
|
|
|
2fc102 |
+ "Users from trusted domains might not be resolved correctly\n"));
|
|
|
2fc102 |
+ }
|
|
|
2fc102 |
+
|
|
|
2fc102 |
return EOK;
|
|
|
2fc102 |
}
|
|
|
2fc102 |
|
|
|
2fc102 |
--
|
|
|
2fc102 |
1.8.4.2
|
|
|
2fc102 |
|