Blame SOURCES/Exit-with-status-0-from-kadmind.patch

d738b9
From 987d80aba6a59dae5242cb544864e23785098106 Mon Sep 17 00:00:00 2001
d738b9
From: Robbie Harwood <rharwood@redhat.com>
d738b9
Date: Wed, 14 Mar 2018 14:31:22 -0400
d738b9
Subject: [PATCH] Exit with status 0 from kadmind
d738b9
d738b9
Typically, 0 denotes successful exit.  In particular, init systems
d738b9
will complain if another different value is returned.  This presents a
d738b9
problem for automated installation jobs which want to restart kadmind.
d738b9
d738b9
`service kadmin stop` typically sends SIGTERM, which is caught by
d738b9
verto and passed to our handler.  Besides cleanup, we then call
d738b9
verto_break(), which causes the verto_run() event loop to return.  The
d738b9
weird return code has been present since the addition of the kadmin
d738b9
code, which used a similar event model for signals.
d738b9
d738b9
(cherry picked from commit f970ad412aca36f8a7d3addb1cd4026ed22e5592)
d738b9
(cherry picked from commit 3bfe632c7011c335362d78356232507d9ee26f73)
d738b9
---
d738b9
 src/kadmin/server/ovsec_kadmd.c | 2 +-
d738b9
 1 file changed, 1 insertion(+), 1 deletion(-)
d738b9
d738b9
diff --git a/src/kadmin/server/ovsec_kadmd.c b/src/kadmin/server/ovsec_kadmd.c
d738b9
index a3edd3b00..9fc49f1e6 100644
d738b9
--- a/src/kadmin/server/ovsec_kadmd.c
d738b9
+++ b/src/kadmin/server/ovsec_kadmd.c
d738b9
@@ -558,5 +558,5 @@ main(int argc, char *argv[])
d738b9
 
d738b9
     krb5_klog_close(context);
d738b9
     krb5_free_context(context);
d738b9
-    exit(2);
d738b9
+    exit(0);
d738b9
 }