summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/migration.py
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-11-26 09:37:12 -0500
committerRob Crittenden <rcritten@redhat.com>2010-12-07 10:37:26 -0500
commit4c75495b3d5cdc4f04fe65e7a656748d149a6180 (patch)
tree075b65a0ff9b8a2b7aa2928447ede8a325ca1e22 /ipalib/plugins/migration.py
parent1c3aa1f2c8fdd0947149353dbf211730cb1fdfee (diff)
downloadfreeipa-4c75495b3d5cdc4f04fe65e7a656748d149a6180.tar.gz
freeipa-4c75495b3d5cdc4f04fe65e7a656748d149a6180.tar.xz
freeipa-4c75495b3d5cdc4f04fe65e7a656748d149a6180.zip
Do not migrate krbPrincipalKey
https://fedorahosted.org/freeipa/ticket/455
Diffstat (limited to 'ipalib/plugins/migration.py')
-rw-r--r--ipalib/plugins/migration.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ipalib/plugins/migration.py b/ipalib/plugins/migration.py
index 1c9545f1..c16f1db4 100644
--- a/ipalib/plugins/migration.py
+++ b/ipalib/plugins/migration.py
@@ -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: