[Freeipa-devel] [PATCH 0001] migrate-ds: Fix to exclude attrs with uppercase characters from migration

Thorsten Scherf tscherf at redhat.com
Mon Oct 20 09:57:24 UTC 2014


-------------- next part --------------
>From 6dd24dc6f08f01997bf3d7ccc06d77a7fd239e61 Mon Sep 17 00:00:00 2001
From: Thorsten Scherf <tscherf at redhat.com>
Date: Mon, 20 Oct 2014 11:47:18 +0200
Subject: [PATCH] Fix entry_attr case to make migrate-ds work again

Migration of a OpenLDAP based directory to FreeIPA with some objectclasses
removed failed because of --user-ignore-attribute didn't work. Fixed that by
making LDAPEntry object entry_attry lowercased.

https://fedorahosted.org/freeipa/ticket/4620
---
 ipalib/plugins/migration.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipalib/plugins/migration.py b/ipalib/plugins/migration.py
index 6b630a464f0be163e82de95afe3a74b22889574b..2500186d26d16d14b7b87dd6902ea385a40ca87b 100644
--- a/ipalib/plugins/migration.py
+++ b/ipalib/plugins/migration.py
@@ -197,7 +197,7 @@ def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwargs
 
     # do not migrate all attributes
     for attr in entry_attrs.keys():
-        if attr in attr_blacklist:
+        if attr.lower() in attr_blacklist:
             del entry_attrs[attr]
 
     # do not migrate all object classes
-- 
1.9.3



More information about the Freeipa-devel mailing list