Imported Upstream version 4.8.10

This commit is contained in:
Mario Fetka
2021-10-03 11:06:28 +02:00
parent 10dfc9587b
commit 03a8170b15
2361 changed files with 1883897 additions and 338759 deletions

View File

@@ -0,0 +1,7 @@
#
# Copyright (C) 2020 FreeIPA Contributors see COPYING for license
#
"""
This module contains RHEL Container specific platform files.
"""
NAME = "rhel_container"

View File

@@ -0,0 +1,13 @@
#
# Copyright (C) 2020 FreeIPA Contributors see COPYING for license
#
"""RHEL container constants
"""
from ipaplatform.rhel.constants import RHELConstantsNamespace
class RHELContainerConstantsNamespace(RHELConstantsNamespace):
pass
constants = RHELContainerConstantsNamespace()

View File

@@ -0,0 +1,30 @@
#
# Copyright (C) 2020 FreeIPA Contributors see COPYING for license
#
"""RHEL container paths
"""
import os
from ipaplatform.rhel.paths import RHELPathNamespace
def data(path):
return os.path.join("/data", path[1:])
class RHELContainerPathNamespace(RHELPathNamespace):
KRB5_CONF = data(RHELPathNamespace.KRB5_CONF)
KRB5_KEYTAB = data(RHELPathNamespace.KRB5_KEYTAB)
NAMED_KEYTAB = data(RHELPathNamespace.NAMED_KEYTAB)
NAMED_CUSTOM_CONF = data(RHELPathNamespace.NAMED_CUSTOM_CONF)
NAMED_CUSTOM_OPTIONS_CONF = data(
RHELPathNamespace.NAMED_CUSTOM_OPTIONS_CONF
)
NSSWITCH_CONF = data(RHELPathNamespace.NSSWITCH_CONF)
PKI_CONFIGURATION = data(RHELPathNamespace.PKI_CONFIGURATION)
SAMBA_DIR = data(RHELPathNamespace.SAMBA_DIR)
HTTPD_IPA_WSGI_MODULES_CONF = None
HTTPD_PASSWD_FILE_FMT = data(RHELPathNamespace.HTTPD_PASSWD_FILE_FMT)
paths = RHELContainerPathNamespace()

View File

@@ -0,0 +1,27 @@
#
# Copyright (C) 2020 FreeIPA Contributors see COPYING for license
#
"""RHEL container services
"""
from ipaplatform.rhel import services as rhel_services
rhel_container_system_units = rhel_services.rhel_system_units.copy()
class RHELContainerService(rhel_services.RHELService):
system_units = rhel_container_system_units
def rhel_container_service_class_factory(name, api=None):
return rhel_services.rhel_service_class_factory(name, api)
class RHELContainerServices(rhel_services.RHELServices):
def service_class_factory(self, name, api=None):
return rhel_container_service_class_factory(name, api)
timedate_services = rhel_services.timedate_services
service = rhel_container_service_class_factory
knownservices = RHELContainerServices()

View File

@@ -0,0 +1,34 @@
#
# Copyright (C) 2020 FreeIPA Contributors see COPYING for license
#
"""RHEL container tasks
"""
import logging
from ipaplatform.rhel.tasks import RHELTaskNamespace
logger = logging.getLogger(__name__)
class RHELContainerTaskNamespace(RHELTaskNamespace):
def modify_nsswitch_pam_stack(
self, sssd, mkhomedir, statestore, sudo=True
):
# freeipa-container images are preconfigured
# authselect select sssd with-sudo --force
logger.debug("Authselect is pre-configured in container images.")
def is_mkhomedir_supported(self):
# authselect is not pre-configured with mkhomedir
return False
def restore_auth_configuration(self, path):
# backup is supported but restore is a no-op
logger.debug("Authselect is pre-configured in container images.")
def migrate_auth_configuration(self, statestore):
logger.debug("Authselect is pre-configured in container images.")
tasks = RHELContainerTaskNamespace()