[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.8, 1.9



Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19147

Modified Files:
	DSMigration.pm.in 
Log Message:
Resolves: #260341
Summary: Migration script references a non-existing directory (comment #22)
Description: introduced ignoreOldEntries not to migrate obsolete config entries.



Index: DSMigration.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- DSMigration.pm.in	30 Aug 2007 00:06:51 -0000	1.8
+++ DSMigration.pm.in	30 Aug 2007 21:45:47 -0000	1.9
@@ -104,6 +104,16 @@
  'nsslapd-ldapiautodnsuffix'       => 'nsslapd-ldapiautodnsuffix'
 );
 
+# these are the obsolete entries we do not migrate
+my %ignoreOldEntries =
+(
+ 'cn=presence,cn=plugins,cn=config' => 'cn=presence,cn=plugins,cn=config',
+ 'cn=aim presence,cn=presence,cn=plugins,cn=config' => 'cn=aim presence,cn=presence,cn=plugins,cn=config',
+ 'cn=icq presence,cn=presence,cn=plugins,cn=config' => 'cn=icq presence,cn=presence,cn=plugins,cn=config',
+ 'cn=yahoo presence,cn=presence,cn=plugins,cn=config' => 'cn=yahoo presence,cn=presence,cn=plugins,cn=config'
+);
+
+
 # these are the attributes for which we will always use
 # the old value
 my %alwaysUseOld =
@@ -519,10 +529,12 @@
             debug(1, "Cannot migrate the entry $dn - skipping\n");
             next;
         } elsif ($oldent && !$newent) {
-            # may have to fix up some values in the old entry
-            fixAttrsInEntry($oldent, $mig, $inst);
-            $rc = $dest->add($oldent);
-            $op = "add";
+            if (!$ignoreOldEntries{$dn}) {  # make sure it's not obsolete
+                # may have to fix up some values in the old entry
+                fixAttrsInEntry($oldent, $mig, $inst);
+                $rc = $dest->add($oldent);
+                $op = "add";
+            }
         } elsif (!$oldent && $newent) {
             if ($dn =~ /o=deleteAfterMigration/i) {
                 $rc = $dest->delete($dn);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]