diff options
author | Rich Megginson <rmeggins@redhat.com> | 2007-10-19 01:50:15 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2007-10-19 01:50:15 +0000 |
commit | 219bd69fb2ec6ece60f512b97dd525b5287d52b3 (patch) | |
tree | e00a8303ef3a1044445711fe8aa39ff8a14de726 /ldap | |
parent | 8fe1c2f6910ef4c2c20a015186b45361e7cfbfef (diff) | |
download | ds-219bd69fb2ec6ece60f512b97dd525b5287d52b3.tar.gz ds-219bd69fb2ec6ece60f512b97dd525b5287d52b3.tar.xz ds-219bd69fb2ec6ece60f512b97dd525b5287d52b3.zip |
Resolves: bug 338991
Bug Description: obsolete values migrated to target instance
Reviewed by: nhosoi (Thanks!)
Fix Description: When fixing the attributes in the old entry, remove any obsolete attributes.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Diffstat (limited to 'ldap')
-rw-r--r-- | ldap/admin/src/scripts/DSMigration.pm.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ldap/admin/src/scripts/DSMigration.pm.in b/ldap/admin/src/scripts/DSMigration.pm.in index a617e8c4..0de30740 100644 --- a/ldap/admin/src/scripts/DSMigration.pm.in +++ b/ldap/admin/src/scripts/DSMigration.pm.in @@ -549,7 +549,11 @@ sub fixAttrsInEntry { my ($ent, $mig, $inst) = @_; for my $attr (keys %{$ent}) { my $lcattr = lc $attr; - if ($transformAttr{$lcattr}) { + if ($ignoreOld{$lcattr}) { + debug(3, "fixAttrsInEntry: ignoring old invalid or obsolete attr $attr\n"); + $ent->remove($attr); + next; + } elsif ($transformAttr{$lcattr}) { my $newval = &{$transformAttr{$lcattr}}($ent, $attr, $mig, $inst); if (!$newval) { debug(2, "Removing attribute $attr from entry ", $ent->getDN(), "\n"); @@ -558,7 +562,7 @@ sub fixAttrsInEntry { debug(2, "Setting new value $newval for attribute $attr in entry ", $ent->getDN(), "\n"); $ent->setValues($attr, $newval); } - } + } # else just keep as is } } |