ad2a64
From 46649808918c027865dfaf78869aeeaddf97f47c Mon Sep 17 00:00:00 2001
ad2a64
From: Alexander Bokovoy <abokovoy@redhat.com>
ad2a64
Date: Thu, 2 Nov 2017 17:14:14 +0200
ad2a64
Subject: [PATCH 17/17] back-sch: cancel memberof retrieval in case of a dirsrv
ad2a64
 shutdown
ad2a64
ad2a64
Do not wait for SSSD to become online if directory server is going
ad2a64
for shutdown. Since it is guaranteed that SSSD will not be able to
ad2a64
function with 389-ds offline, it makes no sense to continue a loop.
ad2a64
---
ad2a64
 src/back-sch.c | 2 +-
ad2a64
 1 file changed, 1 insertion(+), 1 deletion(-)
ad2a64
ad2a64
diff --git a/src/back-sch.c b/src/back-sch.c
ad2a64
index f98b0b4..1998765 100644
ad2a64
--- a/src/back-sch.c
ad2a64
+++ b/src/back-sch.c
ad2a64
@@ -507,7 +507,7 @@ backend_set_process_external_members(Slapi_PBlock *pb,
ad2a64
 		/* This group must exist because it exists in the original tree
ad2a64
 		 * but as dirsrv was restarted, SSSD might still consider its domain offline. */
ad2a64
 		is_group_exists = backend_retrieve_from_nsswitch(&staged, &cbdata);
ad2a64
-		if (!is_group_exists) {
ad2a64
+		if (!is_group_exists && !slapi_is_shutting_down()) {
ad2a64
 			slapi_log_error(SLAPI_LOG_FATAL, plugin_id,
ad2a64
 					"group \"%s\" does not exist because SSSD is offline.\n",
ad2a64
 					staged.name);
ad2a64
-- 
ad2a64
2.13.6
ad2a64