Move user/group constants for PKI and DS into ipaplatform

https://fedorahosted.org/freeipa/ticket/5619

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
Christian Heimes
2016-01-19 14:18:30 +01:00
committed by Martin Basti
parent 4f25b29605
commit 49be6c8d3c
12 changed files with 49 additions and 37 deletions

View File

@@ -8,9 +8,13 @@ This base platform module exports platform dependant constants.
class BaseConstantsNamespace(object):
DS_USER = 'dirsrv'
DS_GROUP = 'dirsrv'
HTTPD_USER = "apache"
IPA_DNS_PACKAGE_NAME = "freeipa-server-dns"
NAMED_USER = "named"
PKI_USER = 'pkiuser'
PKI_GROUP = 'pkiuser'
# ntpd init variable used for daemon options
NTPD_OPTS_VAR = "OPTIONS"
# quote used for daemon options

View File

@@ -45,6 +45,7 @@ import ipapython.errors
from ipalib import x509 # FIXME: do not import from ipalib
from ipaplatform.constants import constants
from ipaplatform.paths import paths
from ipaplatform.redhat.authconfig import RedHatAuthConfig
from ipaplatform.base.tasks import BaseTaskNamespace
@@ -438,14 +439,14 @@ class RedHatTaskNamespace(BaseTaskNamespace):
This values should be constant and may be hardcoded.
Add other values for other users when needed.
"""
if name == 'pkiuser':
if name == constants.PKI_USER:
if uid is None:
uid = 17
if gid is None:
gid = 17
if comment is None:
comment = 'CA System User'
if name == 'dirsrv':
if name == constants.DS_USER:
if comment is None:
comment = 'DS System User'