Skip to content

Commit

Permalink
sssdutils: adding with-mkhomedir common configuration
Browse files Browse the repository at this point in the history
* fixed some minor docstrings typos
  • Loading branch information
Dan Lavu committed Sep 23, 2024
1 parent 27bfd4c commit 974d1b6
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions sssd_test_framework/utils/sssd.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def async_start(
:param service: Service to start, defaults to 'sssd'
:type service: str, optional
:param service_user: User used to start the service, defaults to 'sssd'
:type service_user: str, optional
:param apply_config: Apply current configuration, defaults to True
:type apply_config: bool, optional
:param check_config: Check configuration for typos, defaults to True
Expand Down Expand Up @@ -160,6 +162,8 @@ def start(
:param service: Service to start, defaults to 'sssd'
:type service: str, optional
:param service_user: User used to start the service, defaults to 'sssd'
:type service_user: str, optional
:param raise_on_error: Raise exception on error, defaults to True
:type raise_on_error: bool, optional
:param apply_config: Apply current configuration, defaults to True
Expand Down Expand Up @@ -448,7 +452,7 @@ def genconf(self, section: str | None = None) -> ProcessResult:
Exec ``sssd --genconf`` or ``sssd --genconf-section=section`` if ``section`` is not ``None``.
:param section: Section that will be refreshed. Defaults to ``None``.
:type path: str | None, optional
:type section: str | None, optional
:return: Result of the ran command.
:rtype: ProcessResult
"""
Expand Down Expand Up @@ -690,7 +694,7 @@ def __config_dumps(cfg: configparser.ConfigParser) -> str:
ss.seek(0)
return ss.read()

def __set_debug_level(self, debug_level: str | None = None) -> configparser.ConfigParser:
def __set_debug_level(self, debug_level: str | None = None, ) -> configparser.ConfigParser:
"""Set debug level in all sections."""
cfg = configparser.ConfigParser(interpolation=None)
cfg.read_dict(self.config)
Expand Down Expand Up @@ -861,6 +865,14 @@ def gssapi(self) -> None:
self.sssd.domain["pam_gssapi_services"] = "sudo, sudo-i"
self.sssd.domain["pam_gssapi_check_upn"] = "False"

def mkhomedir(self) -> None:
"""
Configure SSSD with mkhomedir and oddjobd.
"""

self.sssd.authselect.select("sssd", ["with-mkhomedir"])
self.sssd.svc.start("oddjobd.service")

def autofs(self) -> None:
"""
Configure SSSD with autofs.
Expand Down

0 comments on commit 974d1b6

Please sign in to comment.