From 554118e411a4c14f352200dffd7133607f18bb46 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Feb 11 2014 12:02:47 +0000 Subject: Enable and/or start sssd only if either config exists or both pam and nsswitch enabled. --- diff --git a/authinfo.py b/authinfo.py index 680299d..cf5d588 100644 --- a/authinfo.py +++ b/authinfo.py @@ -1218,7 +1218,7 @@ all_configs = [ FileBackup("libuser.conf", SYSCONFDIR+"/libuser.conf"), FileBackup("pwquality.conf", SYSCONFDIR+"/security/pwquality.conf"), FileBackup("login.defs", SYSCONFDIR+"/login.defs"), - FileBackup("sssd.conf", SYSCONFDIR+"/sssd/sssd.conf"), + FileBackup("sssd.conf", PATH_SSSD_CONFIG), FileBackup("shadow", SYSCONFDIR+"/shadow"), FileBackup("passwd", SYSCONFDIR+"/passwd"), FileBackup("gshadow", SYSCONFDIR+"/gshadow"), @@ -4346,8 +4346,12 @@ class AuthInfo: "winbind", nostart) def toggleSSSDService(self, nostart): + + explicitenable = (self.enableSSSD and self.enableSSSDAuth) or + (self.enableSSSD and os.path.exists(PATH_SSSD_CONFIG)) or + (self.enableSSSDAuth and os.path.exists(PATH_SSSD_CONFIG)) toggleSplatbindService(self.implicitSSSD or self.implicitSSSDAuth or - self.enableIPAv2 or self.enableSSSD or self.enableSSSDAuth, + self.enableIPAv2 or explicitenable, PATH_SSSD, "sssd", nostart or not (self.implicitSSSD or self.implicitSSSDAuth or self.enableIPAv2))