summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-03-05 00:15:35 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-03-20 14:31:38 +0100
commit0fcdef99980260d2da308c2c26861492ab983e3d (patch)
treebab4f48016036f09dcdc410eeb32b797a9e74a84 /src
parent3c6b579b14bbf24acd4e8151673fc9c17c9f8615 (diff)
downloadsssd-0fcdef99980260d2da308c2c26861492ab983e3d.tar.gz
sssd-0fcdef99980260d2da308c2c26861492ab983e3d.tar.xz
sssd-0fcdef99980260d2da308c2c26861492ab983e3d.zip
Return error code from ipa_subdom_store
Diffstat (limited to 'src')
-rw-r--r--src/providers/ipa/ipa_subdomains.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
index 7d6e5958e..529618bca 100644
--- a/src/providers/ipa/ipa_subdomains.c
+++ b/src/providers/ipa/ipa_subdomains.c
@@ -230,11 +230,13 @@ static errno_t ipa_subdom_store(struct sss_domain_info *domain,
ret = sysdb_subdomain_store(domain->sysdb, name, realm, flat, id);
if (ret) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_subdomain_store failed.\n"));
+ goto done;
}
+ ret = EOK;
done:
talloc_free(tmp_ctx);
- return EOK;
+ return ret;
}
static errno_t
@@ -431,8 +433,11 @@ static errno_t ipa_subdomains_refresh(struct ipa_subdomains_ctx *ctx,
/* ok let's try to update it */
ret = ipa_subdom_store(domain, reply[c]);
if (ret) {
- DEBUG(SSSDBG_OP_FAILURE, ("Failed to parse subdom data\n"));
- goto done;
+ /* Nothing we can do about the errorr. Let's at least try
+ * to reuse the existing domain
+ */
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Failed to parse subdom data, "
+ "will try to use cached subdomain\n"));
}
handled[c] = true;
h++;
@@ -452,10 +457,13 @@ static errno_t ipa_subdomains_refresh(struct ipa_subdomains_ctx *ctx,
if (handled[c]) {
continue;
}
+ /* Nothing we can do about the errorr. Let's at least try
+ * to reuse the existing domain.
+ */
ret = ipa_subdom_store(domain, reply[c]);
if (ret) {
- DEBUG(SSSDBG_OP_FAILURE, ("Failed to parse subdom data\n"));
- goto done;
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Failed to parse subdom data, "
+ "will try to use cached subdomain\n"));
}
}