Blob Blame History Raw
From 46649808918c027865dfaf78869aeeaddf97f47c Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Thu, 2 Nov 2017 17:14:14 +0200
Subject: [PATCH 17/17] back-sch: cancel memberof retrieval in case of a dirsrv
 shutdown

Do not wait for SSSD to become online if directory server is going
for shutdown. Since it is guaranteed that SSSD will not be able to
function with 389-ds offline, it makes no sense to continue a loop.
---
 src/back-sch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/back-sch.c b/src/back-sch.c
index f98b0b4..1998765 100644
--- a/src/back-sch.c
+++ b/src/back-sch.c
@@ -507,7 +507,7 @@ backend_set_process_external_members(Slapi_PBlock *pb,
 		/* This group must exist because it exists in the original tree
 		 * but as dirsrv was restarted, SSSD might still consider its domain offline. */
 		is_group_exists = backend_retrieve_from_nsswitch(&staged, &cbdata);
-		if (!is_group_exists) {
+		if (!is_group_exists && !slapi_is_shutting_down()) {
 			slapi_log_error(SLAPI_LOG_FATAL, plugin_id,
 					"group \"%s\" does not exist because SSSD is offline.\n",
 					staged.name);
-- 
2.13.6