[
https://issues.apache.org/jira/browse/DIRSERVER-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705446#action_12705446
]
Stefan Seelmann commented on DIRSERVER-803:
-------------------------------------------
I'm working on alias issues, see DIRSERVER-1355 and DIRSERVER-1349.
I think the detection of cycles during search isn't that hard, the algorithm is
described here:
http://cwiki.apache.org/confluence/display/DIRxSRVx11/Structure+and+Organization#StructureandOrganization-HandlingDereferencingwithSubtreeLevelScope.
I already implemented it for the SubtreeScopeCursor: The idea is to collect a
list of all search bases that are relevant for a subtree search, create a
cursor for each base and switch between these cursors. Therefore I use the ID
of the provided search base and recursively get all dereferenced aliases using
the subtree alias index. Only if the dereferenced alias extends the search
scope it is added to the list. Additional descendants of the added search scope
are removed from the list. The cycle detection is simple because we only need
to check if a dereferenced alias is already contained in this list. In that
case we could just quit the current recursion.
I would voluneer for this issue. The SubtreeScopeCursor implementation seems to
work, I just add some more test cases and check the behaviour of other LDAP
servers. Atm I don't understand what the SubtreeScopeEvaluator is used for...
> Creating an alias from a child entry to the ancestor causes an error (return
> code 36)
> -------------------------------------------------------------------------------------
>
> Key: DIRSERVER-803
> URL: https://issues.apache.org/jira/browse/DIRSERVER-803
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Affects Versions: 1.5.1, 1.5.0, 1.0.2, 1.0.1, 1.0
> Environment: * ApacheDS 1.0.0
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> * Windows XP Professional SP2
> Reporter: Stefan Zoerner
> Assignee: Alex Karasulu
> Fix For: 1.5.5
>
> Attachments: AddAliasFromDescendantTest.java
>
>
> It fails to import the following two entries into ApacheDS 1.0 (default
> server.xml).
> The second entry is an alias to the first one, and is directly located below
> the first entry:
> dn: ou=Singers,dc=example,dc=com
> ou: Singers
> objectclass: top
> objectclass: organizationalUnit
> dn: ou=Songwriters,ou=Singers,dc=example,dc=com
> ou: Songwriters
> objectclass: top
> objectclass: organizationalUnit
> objectclass: alias
> aliasedobjectname: ou=Singers,dc=example,dc=com
> Here is the result I got from an ldapmodify attempt:
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w ****** -q -c
> -a -f aliasSingers.ldif
> ldap_add: Unknown error
> ldap_add: additional info: failed to add entry
> ou=Songwriters,ou=Singers,dc=example,dc=com: [36] aliasDereferencingProblem -
> attempt to create alias with cycle to relative ou=Singers,dc=example,dc=com
> not allowed from descendent alias
> 2.5.4.11=songwriters,2.5.4.11=singers,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com
> It seems that ApacheDS does not allow to create an alias from a descendant. I
> tried the same with Tivoli Directory Server 6.0 and Sun Java System Directory
> Server 5.2, both allowed this constellation.
> Find attached a JNDI JUnit test which is able to cause the error by adding
> two entries programmatically.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.