Issue #197 has been updated by Jonathan Clarke. File store-unescaped-dn.patch added % Done changed from 0 to 50
Actually, a much simpler approach to this is just to store the unescaped DN. There is a method, "unescapeValue()":http://java.sun.com/javase/6/docs/api/javax/naming/ldap/Rdn.html#unescapeValue(java.lang.String) for this, in the Rdn class. Thus, all comparaison ignore any escapes. The apply() method in JndiServices uses provided DNs to instantiate LdapName objects, which will escape values again. Proposed patch attached. ---------------------------------------- Bug #197: Problem with DN that has a # sign http://tools.lsc-project.org/issues/show/197 Author: Samuel Tran Status: New Priority: High Assigned to: Sébastien Bahloul Category: Core Target version: 1.2.0 I have installed LSC 1.2 using the snapshot lsc-core-1.2-SNAPSHOT-dist.tar.gz from 04/14/2010 on CentOS Linux 5.4. I want to synchronize two OpenLDAP Directories: the source directory is OpenLDAP 2.3.x and the destination is OpenLDAP 2.4.x. Some DNs in the source directory have a # sign, e.g: dn: cn=Elevator#2,ou=Subscribers,dc=example,dc=com objectClass: inetOrgPerson givenName: Elevator uid: Elevator#2 cn: Elevator#2 sn: #2 My LSC synchronization is as follows: lsc.syncoptions.MySyncTask = org.lsc.beans.syncoptions.PropertiesBasedSyncOptions lsc.syncoptions.MySyncTask.default.action = F When I first ran lsc, it created all the DNs in the destination directory. Then I ran it again. Even though no changes were made in the source directory, it tries to rename the DNs with a # sign. For instance it tries to rename 'cn=Elevator#2,ou=Subscribers,dc=example,dc=com'; here is the ouput of the lcs run: Apr 15 15:10:28 - WARN - WARNING: updating the RDN of the entry will cancel other modifications! Relaunch synchronization to complete update. Apr 15 15:10:28 - INFO - # Renaming entry cn=Elevator\#2,ou=TelecomAssets for MySyncTask dn: cn=Elevator\#2,ou=TelecomAssets,dc=example,dc=com changetype: modrdn newrdn: ou=TelecomAssets deleteoldrdn: 1 newsuperior: cn=Elevator\#2 Then I ran lsc for a third time, the DN was not renamed and I still got the same error message. I guess lsc is escaping the # sign with a backslash, which is causing that problem. Thanks for your help. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://tools.lsc-project.org/my/account
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-dev mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-dev

