Skip to content
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

lib389 PosixGroups type can not handle rdn properly #3567

Closed
389-ds-bot opened this issue Sep 13, 2020 · 4 comments
Closed

lib389 PosixGroups type can not handle rdn properly #3567

389-ds-bot opened this issue Sep 13, 2020 · 4 comments
Labels
closed: fixed Migration flag - Issue

Comments

@389-ds-bot
Copy link

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/50511

  • Created at 2019-07-23 11:06:38 by aborah (@aborah-sudo)
  • Closed at 2019-07-23 21:08:06 as Fixed
  • Assigned to nobody

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: kenoh edited for clarity.

@389-ds-bot 389-ds-bot added the closed: fixed Migration flag - Issue label Sep 13, 2020
@389-ds-bot
Copy link
Author

389-ds-bot commented Sep 13, 2020

Comment from spichugi (@droideck) at 2019-07-23 17:24:00

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.
#3568

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

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2019-07-23 17:24:01

Metadata Update from @droideck:

  • Custom field origin adjusted to None
  • Custom field reviewstatus adjusted to None

@389-ds-bot
Copy link
Author

Comment from aborah (@aborah-sudo) at 2019-07-23 17:31:32

@droideck changes are done , as per your suggestion .

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2019-07-23 21:08:06

Commit 9ea5b9bf fixes this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: fixed Migration flag - Issue
Projects
None yet
Development

No branches or pull requests

1 participant