New classes for user and group names provide a convenient way to access the uid and primary gid of a user / gid of a group. The classes also provide chown() and chgrp() methods to simplify common operations. The wrappers are subclasses of builtin str type and behave like ordinary strings with additional features. The pwd and grp structs are retrieved once and then cached. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
23 lines
556 B
Python
23 lines
556 B
Python
#
|
|
# Copyright (C) 2020 FreeIPA Contributors, see COPYING for license
|
|
#
|
|
|
|
"""
|
|
This SUSE OS family base platform module exports default platform
|
|
related constants for the SUSE OS family-based systems.
|
|
"""
|
|
|
|
# Fallback to default path definitions
|
|
from ipaplatform.base.constants import BaseConstantsNamespace, User, Group
|
|
|
|
|
|
class SuseConstantsNamespace(BaseConstantsNamespace):
|
|
HTTPD_USER = User("wwwrun")
|
|
HTTPD_GROUP = Group("www")
|
|
# Don't have it yet
|
|
SSSD_USER = User("root")
|
|
TLS_HIGH_CIPHERS = None
|
|
|
|
|
|
constants = SuseConstantsNamespace()
|