mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Do not migrate krbPrincipalKey
https://fedorahosted.org/freeipa/ticket/455
This commit is contained in:
parent
1c3aa1f2c8
commit
4c75495b3d
@ -49,6 +49,8 @@ _supported_schemas = (u'RFC2307bis', u'RFC2307')
|
||||
|
||||
|
||||
def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwargs):
|
||||
attr_blacklist = ['krbprincipalkey']
|
||||
|
||||
# get default primary group for new users
|
||||
if 'def_group_dn' not in ctx:
|
||||
def_group = config.get('ipadefaultprimarygroup')
|
||||
@ -69,6 +71,11 @@ def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwargs
|
||||
entry_attrs['homedirectory'] = home_dir
|
||||
entry_attrs.setdefault('gidnumber', ctx['def_group_gid'])
|
||||
|
||||
# do not migrate attributes autogenerated during migration
|
||||
for attr in entry_attrs.keys():
|
||||
if attr in attr_blacklist:
|
||||
del entry_attrs[attr]
|
||||
|
||||
# generate a principal name and check if it isn't already taken
|
||||
principal = u'%s@%s' % (pkey, api.env.realm)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user