mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use new classes for run_command and Service
User and Group now return unmodified instance when they are called with an instance of themselves: User(user) is user. run_command() and Service class accept either names or User object. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
committed by
Rob Crittenden
parent
72fb4e60c8
commit
b19d20e2db
@@ -36,6 +36,7 @@ from ipapython.dn import DN
|
||||
from ipapython import kerberos
|
||||
from ipalib import api, errors, x509
|
||||
from ipaplatform import services
|
||||
from ipaplatform.constants import User
|
||||
from ipaplatform.paths import paths
|
||||
from ipaserver.masters import (
|
||||
CONFIGURED_SERVICE, ENABLED_SERVICE, HIDDEN_SERVICE, SERVICE_LIST
|
||||
@@ -308,6 +309,8 @@ class Service:
|
||||
self.keytab = keytab
|
||||
self.cert = None
|
||||
self.api = api
|
||||
if service_user is not None:
|
||||
service_user = User(service_user)
|
||||
self.service_user = service_user
|
||||
self.keytab_user = service_user
|
||||
self.dm_password = None # silence pylint
|
||||
|
||||
Reference in New Issue
Block a user