mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Make check_required_principal() case-insensitive
service-del deletes services by DN and LDAP DNs are compared case-insensitive. Make check_required_principal() compare the service name case insensitive. Fixes: https://pagure.io/freeipa/issue/8308 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
@@ -287,8 +287,8 @@ def check_required_principal(ldap, principal):
|
||||
try:
|
||||
host_is_master(ldap, principal.hostname)
|
||||
except errors.ValidationError:
|
||||
service_types = ['HTTP', 'ldap', 'DNS', 'dogtagldap']
|
||||
if principal.service_name in service_types:
|
||||
service_types = {'http', 'ldap', 'dns', 'dogtagldap'}
|
||||
if principal.service_name.lower() in service_types:
|
||||
raise errors.ValidationError(name='principal', error=_('This principal is required by the IPA master'))
|
||||
|
||||
def update_krbticketflags(ldap, entry_attrs, attrs_list, options, existing):
|
||||
|
||||
Reference in New Issue
Block a user