#51149 Ticket 49859 A distinguished value can be missing in an entry
Closed by spichugi. Opened by tbordaz.
tbordaz/389-ds-base ticket_49859  into  master

Download 51149.patch

Bug description:
According to RFC 4511 (see ticket), the values of the RDN attributes
should be present in an entry.
With a set of replicated operations, it is possible that those values
would be missing

Fix description:
MOD and MODRDN update checks that the RDN values are presents.
If they are missing they are added to the resulting entry. In addition
the set of modifications to add those values are also indexed.
The specific case of single-valued attributes, where the final and unique value
can not be the RDN value, the attribute nsds5ReplConflict is added.

https://pagure.io/389-ds-base/issue/49859

Reviewed by: ?

Platforms tested: F31

I noticed that entry_get_rdn_mods() returns a result code, but you never check it. Is that intentional?

You should not be using python-ldap "_s" functions any more. You just need to create a second UserAccount for M2 with the same DN, then you don't need to call search_s() or rename_s()

Similar here, you should be able to do a UserAccounts.get(...) and check the attrs rather than ent.getValues.

good hygiene to always 0 ints, NULL pointers, and for the struct bv, to do {0} which is c99 syntax to zero the struct on the stack.

rdns_count should be size_t since it offsets into an array. You can also declare it in the for loop (again, c99).

rebased onto b985ae7e3664fc6f77b6ab35ff137e6a98faa2b2

Thanks for the reviews. I updated the patch.

Thanks Thierry, LGTM!

rebased onto 2ccd0bed4e60e44303d5f1cf96bd30572ffea85b

Pull-Request has been merged by tbordaz

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4202

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata