mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-25 22:50:12 -05:00
Disallow removal of dogtag and ipa-dnskeysyncd services on IPA servers
Also removes dogtagldap from unremovable services Fixes: https://pagure.io/freeipa/issue/9764 Signed-off-by: David Hanina <dhanina@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
1 parent
ed8b4bc363
commit
1419689113
2 files changed
+27
-1
No files matched your search
@@ -323,7 +323,7 @@ def check_required_principal(ldap, principal):
|
||||
try:
|
||||
host_is_master(ldap, principal.hostname)
|
||||
except errors.ValidationError:
|
||||
service_types = {'http', 'ldap', 'dns', 'dogtagldap'}
|
||||
service_types = {'http', 'ldap', 'dns', 'dogtag', 'ipa-dnskeysyncd'}
|
||||
if principal.service_name.lower() in service_types:
|
||||
raise errors.ValidationError(
|
||||
name='principal',
|
||||
|
||||
@@ -864,6 +864,32 @@ class test_service(Declarative):
|
||||
),
|
||||
),
|
||||
|
||||
dict(
|
||||
desc=('Delete the current host (master?) %s dogtag service,'
|
||||
' should be caught' % api.env.host),
|
||||
command=('service_del', ['dogtag/%s' % api.env.host], {}),
|
||||
expected=errors.ValidationError(
|
||||
name='principal',
|
||||
error='dogtag/%s@%s is required by the IPA master' % (
|
||||
api.env.host,
|
||||
api.env.realm
|
||||
)
|
||||
),
|
||||
),
|
||||
|
||||
dict(
|
||||
desc=('Delete the current host (master?) %s ipa-dnskeysyncd'
|
||||
' service, should be caught' % api.env.host),
|
||||
command=('service_del', ['ipa-dnskeysyncd/%s' % api.env.host], {}),
|
||||
expected=errors.ValidationError(
|
||||
name='principal',
|
||||
error='ipa-dnskeysyncd/%s@%s is required by the IPA master' % (
|
||||
api.env.host,
|
||||
api.env.realm
|
||||
)
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Disable the current host (master?) %s HTTP service, should be caught' % api.env.host,
|
||||
|
||||
Reference in new issue
Block a user