#50511 lib389 PosixGroups type can not handle rdn properly
Closed: wontfix 4 years ago by spichugi. Opened 4 years ago by aborah.

Issue Description

Lib389 PosixGroups type can not handle rdn properly.

PosixGroups(topo, Suffix, rdn=None)._basedn 
>>> 'None,dc=SubSuffix,dc=autoMembers,dc=com' ---  wrong
PosixGroups(topo, Suffix, rdn='')._basedn
>>> ',dc=SubSuffix,dc=autoMembers,dc=com'  --- wrong

Output from other types:

Groups(topo, Suffix, rdn=None)._basedn
>>>'dc=SubSuffix,dc=autoMembers,dc=com'   --- right
Groups(topo_m4.all_insts.get('master1'), Suffix, rdn='')._basedn
>>> 'dc=SubSuffix,dc=autoMembers,dc=com'  ---  right

EDIT: mhonek edited for clarity.


rdn='' is not a valid input. rdn=None is the right one if you want an entry without rdn.
I think the code should be changed to what I proposed in PR because it is explicit and it forbids the wrong behavior.
https://pagure.io/389-ds-base/pull-request/50512

UserAccounts class already has the right logic and I think all of the groups.py classes should follow it.

Metadata Update from @spichugi:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None

4 years ago

@spichugi changes are done , as per your suggestion .

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 issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3567

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests