mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Don't check for systemd service
ipaplatform no longer checks for the presence of a systemd service file to detect the name of the domainname service. Instead it uses osinfo's version to use the old name on Fedora 28 and the new name on Fedora 29. This fixes a SELinux violation that prevented httpd from listing systemd service files. Fixes: https://pagure.io/freeipa/issue/7661 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
b8528da5a8
commit
1c03181e78
@ -24,8 +24,7 @@ Contains Fedora-specific service class implementations.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
|
||||
from ipaplatform.osinfo import osinfo
|
||||
from ipaplatform.redhat import services as redhat_services
|
||||
|
||||
# Mappings from service names as FreeIPA code references to these services
|
||||
@ -35,9 +34,7 @@ fedora_system_units = redhat_services.redhat_system_units.copy()
|
||||
# Fedora 28 and earlier have fedora-domainname.service. Starting from
|
||||
# Fedora 29, the service is called nis-domainname.service as defined in
|
||||
# ipaplatform.redhat.services.
|
||||
HAS_FEDORA_DOMAINNAME_SERVICE = os.path.isfile(
|
||||
"/usr/lib/systemd/system/fedora-domainname.service"
|
||||
)
|
||||
HAS_FEDORA_DOMAINNAME_SERVICE = int(osinfo.version_id) <= 28
|
||||
|
||||
if HAS_FEDORA_DOMAINNAME_SERVICE:
|
||||
fedora_system_units['domainname'] = 'fedora-domainname.service'
|
||||
|
Loading…
Reference in New Issue
Block a user