Stefan Seelmann wrote:
Hi guys,

When trying to add an alias entry which aliasedObjectName points to an
non-existing entry, this is refused by the server. That's OK to avoid an
inconsistent state.

However it is possible to
- add a real entry, say "ou=people,dc=example,dc=com"
- add an alias to it, say "ou=users,dc=example,dc=com"
- delete the real entry "ou=people,dc=example,dc=com"
After that the alias "ou=users,dc=example,dc=com" still exists and its
aliasedObjectName still contains "ou=people,dc=example,dc=com", but that
doesn't exist. Now when deleting this alias I get an NPE when dropping
the subAliasIdx.
That should not be the case. It should be fixed.
I'd like to discuss the possible solutions:

1. Reject deletion of an entry, when an alias points to this entry. This
is easy to check in the JdbmStore using the aliasIdx.
No. We can have an alias pointing to nothing, we just have to return an AliasProbkel error :

aliasProblem (33)
        Indicates that an alias problem has occurred.  For example,
        the code may used to indicate an alias has been dereferenced
        that names no object.


2. Automatically delete all alias entries that point to the entry that
should be deleted (cool, some kind of cascade delete). This is also easy
to implement in JdmbStore.
Same as previously : we should keep the alias, just in case.
3. Keep the current sitation, but then we need to add some error
handling for the aliasIdx, oneAliasIdx and subAliasIdx, what is painful
IMHO.
+1. Painful, but necessary, IMHO... Don't we have a cache will all the aliases taht is built when we start the server ? (I don't remember from the top of my head ...)

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to