New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attribute Uniqueness Plugin uses wrong subtree on ModRDN #4763
Comments
Downstream bug: |
IMHO the issue is that we use "sdn" (the target entry parent) instead of "superior" (the renamed entry parent) while calling findSubtreeAndSearch / searchAllSubtrees |
…#4871) Bug Description: When using the Attribute uniqueness plugin, restricted to one subtree, moving an object with an already existing attribute to this subtree does not raise any exceptions. It appears that the originating subtree is searched instead. Fix Description: Use parent DN of the new entry when searching for attribute uniqueness. Add test to plugins/attruniq_test.py suite. Fixes: #4763 Reviewed by: @tbordaz (Thanks!)
Can this backported down to 1.4.3 please? |
…#4871) Bug Description: When using the Attribute uniqueness plugin, restricted to one subtree, moving an object with an already existing attribute to this subtree does not raise any exceptions. It appears that the originating subtree is searched instead. Fix Description: Use parent DN of the new entry when searching for attribute uniqueness. Add test to plugins/attruniq_test.py suite. Fixes: #4763 Reviewed by: @tbordaz (Thanks!)
…#4871) Bug Description: When using the Attribute uniqueness plugin, restricted to one subtree, moving an object with an already existing attribute to this subtree does not raise any exceptions. It appears that the originating subtree is searched instead. Fix Description: Use parent DN of the new entry when searching for attribute uniqueness. Add test to plugins/attruniq_test.py suite. Fixes: #4763 Reviewed by: @tbordaz (Thanks!)
…#4871) Bug Description: When using the Attribute uniqueness plugin, restricted to one subtree, moving an object with an already existing attribute to this subtree does not raise any exceptions. It appears that the originating subtree is searched instead. Fix Description: Use parent DN of the new entry when searching for attribute uniqueness. Add test to plugins/attruniq_test.py suite. Fixes: #4763 Reviewed by: @tbordaz (Thanks!)
@droideck would you revisit the fix as it creates a regression detected by IPA (#2000420). The scope of testing is defined by the plugin attribute, not by the source or destination entry. |
@droideck , |
Issue Description
When using the Attribute uniqueness plugin, restricted to one subtree, moving an object with an already existing attribute to this subtree does not raise any exceptions. It appears that the originating subtree is searched instead.
Package Version and Platform:
Steps to Reproduce
ou=c1,dc=example,dc=com
andou=c2,dc=example,dc=com
c1
subtree, restricting (for example) the mail attribute.mail
inc2
(this should be allowed).c1
c1
. This should raise an exeption as another object with the same value formail
already exists inc1
but works without issues.c2
raises an exception even though there is no uniqueness constraint onc2
.Expected results
The attr-uniq plugin should prevent invalid move operations.
Additional context
I've tried to get to the root cause of this issue, and debug logs suggest that https://github.com/389ds/389-ds-base/blob/master/ldap/servers/plugins/uiduniq/uid.c#L1395 is called with the old
parentDN
. However, as this is my first time digging through the codebase I was unable to figure out why this happens.The text was updated successfully, but these errors were encountered: