#818 Unable to edit empty group's description
Closed: Fixed Opened by edewata.

If a group doesn't have any members, modifying the group's description will fail with "No such attribute." Once a member is added, the operation will work properly.

The problem happens in UGSubsystem.modifyGroup(). In the above scenario the modify request doesn't contain any members because the group is already empty. However, the code incorrectly interprets it as a request to remove all members, so it will try to delete the uniquemember attribute, which will fail because the group has no such attribute.

Enumeration<String> e = grp.getMemberNames();
if (e.hasMoreElements() == true) {
    ...
    mod.add(LDAPModification.REPLACE, attrMembers);
} else {
    if (!grp.getName().equalsIgnoreCase(SUPER_CERT_ADMINS)) {
        mod.add(LDAPModification.DELETE, attrMembers);
    } else {
        ...
    }
}

Steps to reproduce:

  1. Create a group without any members.
  2. Run pki group-mod --description , this will fail.
  3. Add a member to the group.
  4. Repeat step #2, it will work.

Expected result: The group-mod command should work regardless of the number of members in the group.


This problem is also encountered by QE. Moving to 10.2 July.

master: 579ca2f8c894087c839e60b7c5775b5e7483362a

Metadata Update from @edewata:
- Issue assigned to edewata
- Issue set to the milestone: 10.2 - 08/14 (August)

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1385

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, and we apologize for any inconvenience.

Metadata