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

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