cheimes / rpms / authselect

Forked from rpms/authselect 6 years ago
Clone
Blob Blame History Raw
From fb7477d0a9e5077adf328163fb83bb8aad8242ca Mon Sep 17 00:00:00 2001
From: Christian Heimes <cheimes@redhat.com>
Date: Wed, 25 Apr 2018 15:59:22 +0200
Subject: [PATCH] Don't disable oddjobd.service

authselect disables oddjobd.service unless the mkhomedir option is
supplied. This breaks other services that depend on oddjobd, e.g.
FreeIPA.

Enable oddjobd.service with mkhomedir. Don't touch oddjobd.service
otherwise.

See: https://pagure.io/freeipa/issue/7465
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1571844
Signed-off-by: Christian Heimes <cheimes@redhat.com>
---
 src/compat/authcompat.py.in.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compat/authcompat.py.in.in b/src/compat/authcompat.py.in.in
index e83c36e..95fd07f 100755
--- a/src/compat/authcompat.py.in.in
+++ b/src/compat/authcompat.py.in.in
@@ -437,10 +437,10 @@ class AuthCompat:
                 config.cleanup()
                 self.disableService(config.service)
 
+        # Enable oddjobd for mkhomedir, but don't disable the service in
+        # case it's already running.
         if self.options.getBool("mkhomedir"):
             self.enableService("oddjobd")
-        else:
-            self.disableService("oddjobd")
 
 
 def main():
-- 
2.14.3