[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Patch: Bugs with back-ldap/meta mappings (ITS#1787)

Pierangelo Masarati writes:
>> Removed attributes are
>> put in both the maps for local and foreign names:
>>         # Remove description and present title as description instead
>>         map attribute   description
>>         map attribute   description title
>> -->
>>         slapd.conf: line 10: duplicate mapping found (ignored)
> I admit attribuet mapping has been sometime unclear in its usage, 
> however I never noticed such problems in its usage.  Of course
> I didn't use it intensively, only played with it for a while.
> Can you clarify the point further, before I commit your patches?

         map attribute description
2nd argument is the attribute in the foreign server, while in
         map attribute description title
2nd argument is the attribute in the local server.  Yet the code
calls both 2nd arguments 'src', and the optional 3rd argument 'dst'.

In the 2-argument case, there is no attribute which occurs in the local
server, yet the code puts the attribute in the maps for both directions
(both to and from local server).  It just makes sure the non-empty
attribute is in 'src':
		if ( *dst != 0 ) {
			mapping[1].src = mapping->dst;
			mapping[1].dst = mapping->src;
		} else {
			mapping[1].src = mapping->src;
			mapping[1].dst = mapping->dst;