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

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