mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Remove duplicate functionality in upgrade
Since krbinstance code can now handle all operations of the `enabled_anonymous_principal` function from upgrade we can remove extraneous function altogether. https://pagure.io/freeipa/issue/6799 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
191668e85b
commit
2eabb0dab7
@@ -1482,20 +1482,6 @@ def add_default_caacl(ca):
|
|||||||
sysupgrade.set_upgrade_state('caacl', 'add_default_caacl', True)
|
sysupgrade.set_upgrade_state('caacl', 'add_default_caacl', True)
|
||||||
|
|
||||||
|
|
||||||
def enable_anonymous_principal(krb):
|
|
||||||
princ_realm = krb.get_anonymous_principal_name()
|
|
||||||
dn = DN(('krbprincipalname', princ_realm), krb.get_realm_suffix())
|
|
||||||
try:
|
|
||||||
_ = api.Backend.ldap2.get_entry(dn) # pylint: disable=unused-variable
|
|
||||||
except ipalib.errors.NotFound:
|
|
||||||
krb.add_anonymous_principal()
|
|
||||||
|
|
||||||
try:
|
|
||||||
api.Backend.ldap2.set_entry_active(dn, True)
|
|
||||||
except ipalib.errors.AlreadyActive:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup_pkinit(krb):
|
def setup_pkinit(krb):
|
||||||
root_logger.info("[Setup PKINIT]")
|
root_logger.info("[Setup PKINIT]")
|
||||||
|
|
||||||
@@ -1809,7 +1795,7 @@ def upgrade_configuration():
|
|||||||
KDC_CERT=paths.KDC_CERT,
|
KDC_CERT=paths.KDC_CERT,
|
||||||
KDC_KEY=paths.KDC_KEY,
|
KDC_KEY=paths.KDC_KEY,
|
||||||
CACERT_PEM=paths.CACERT_PEM)
|
CACERT_PEM=paths.CACERT_PEM)
|
||||||
enable_anonymous_principal(krb)
|
krb.add_anonymous_principal()
|
||||||
http.request_anon_keytab()
|
http.request_anon_keytab()
|
||||||
setup_pkinit(krb)
|
setup_pkinit(krb)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user