Blame SOURCES/0097-ipa-delete-content-of-disabled-domains.patch

5cd47f
From 124957a91db25736ce8ea82852db65d8fa243e58 Mon Sep 17 00:00:00 2001
5cd47f
From: Sumit Bose <sbose@redhat.com>
5cd47f
Date: Wed, 18 Sep 2019 18:09:23 +0200
5cd47f
Subject: [PATCH 97/97] ipa: delete content of disabled domains
5cd47f
MIME-Version: 1.0
5cd47f
Content-Type: text/plain; charset=UTF-8
5cd47f
Content-Transfer-Encoding: 8bit
5cd47f
5cd47f
Related to https://pagure.io/SSSD/sssd/issue/4078
5cd47f
5cd47f
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
5cd47f
---
5cd47f
 src/providers/ipa/ipa_subdomains.c | 7 +++++++
5cd47f
 1 file changed, 7 insertions(+)
5cd47f
5cd47f
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
5cd47f
index 2ffc6bf7a..b9ce25063 100644
5cd47f
--- a/src/providers/ipa/ipa_subdomains.c
5cd47f
+++ b/src/providers/ipa/ipa_subdomains.c
5cd47f
@@ -821,6 +821,13 @@ static errno_t ipa_subdomains_check_domain_state(struct sss_domain_info *dom,
5cd47f
                 DEBUG(SSSDBG_OP_FAILURE, "sysdb_domain_set_enabled failed.\n");
5cd47f
                 return ret;
5cd47f
             }
5cd47f
+
5cd47f
+            ret = sysdb_subdomain_content_delete(dom->sysdb, dom->name);
5cd47f
+            if (ret != EOK) {
5cd47f
+                DEBUG(SSSDBG_OP_FAILURE,
5cd47f
+                      "sysdb_subdomain_content_delete failed.\n");
5cd47f
+                return ret;
5cd47f
+            }
5cd47f
         }
5cd47f
     } else {
5cd47f
         /* enabled domain if it was disabled */
5cd47f
-- 
5cd47f
2.20.1
5cd47f