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

Thorsten Scherf tscherf at redhat.com
Tue Oct 21 07:12:47 UTC 2014


Just realized that I sent the email without body. Mea culpa. Here we go:

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


On [Mon, 20.10.2014 11:57], Thorsten Scherf wrote:
>

>>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
>

>_______________________________________________
>Freeipa-devel mailing list
>Freeipa-devel at redhat.com
>https://www.redhat.com/mailman/listinfo/freeipa-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20141021/02347646/attachment.sig>


More information about the Freeipa-devel mailing list