From 54046d372bdde78ef224157472b8a410d1d240d4 Mon Sep 17 00:00:00 2001
From: Justin Stephenson <jstephen@redhat.com>
Date: Tue, 3 Aug 2021 11:40:29 -0400
Subject: [PATCH] MONITOR: Return success from genconf with no config

Resolves: https://github.com/SSSD/sssd/issues/5729
---
 src/monitor/monitor.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 41601ec559..5c9cc42375 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -1642,6 +1642,12 @@ errno_t load_configuration(TALLOC_CTX *mem_ctx,
         goto done;
     }
 
+    /* return EOK so genconf=KCM may start without any
+     * sssd configuration */
+    if (only_section != NULL) {
+        goto done;
+    }
+
     /* Validate the configuration in the database */
     /* Read in the monitor's configuration */
     ret = get_monitor_config(ctx);
