Univention Bugzilla – Full Text Bug Listing |
Summary: | Move of sub ou with RSAT tools leads to rejects | ||
---|---|---|---|
Product: | UCS | Reporter: | Janis Meybohm <meybohm> |
Component: | UDM (Generic) | Assignee: | Stefan Gohmann <gohmann> |
Status: | CLOSED FIXED | QA Contact: | Dirk Wiesenthal <wiesenthal> |
Severity: | normal | ||
Priority: | P5 | CC: | botner, gohmann, jmm |
Version: | UCS 3.2 | ||
Target Milestone: | UCS 3.2-0-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: | https://forge.univention.org/bugzilla/show_bug.cgi?id=47374 | ||
What kind of report is it?: | --- | What type of bug is this?: | --- |
Who will be affected by this bug?: | --- | How will those affected feel about the bug?: | --- |
User Pain: | Enterprise Customer affected?: | ||
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | Bug group (optional): | ||
Max CVSS v3 score: | |||
Bug Depends on: | |||
Bug Blocks: | 33566, 34266 |
Description
Janis Meybohm
2013-11-20 11:16:13 CET
We should also check a backport for UCS 3.1. The problems seems to be in modules/univention/admin/handlers/__init__.py about line 388. The code tries this: subnewdn = subolddn.replace(self.dn,newdn) These are the values in my example: subolddn: uid=user_test_h80,ou=TEST_H81,BASE self.dn: ou=test_h81,BASE newdn: OU=TEST_H81,ou=test_h82,BASE I'm currently unsure why this works via UDM CLI. Move to UDM. *** Bug 25113 has been marked as a duplicate of this bug. *** *** Bug 31994 has been marked as a duplicate of this bug. *** (In reply to Stefan Gohmann from comment #2) > The problems seems to be in modules/univention/admin/handlers/__init__.py > about line 388. The code tries this: > subnewdn = subolddn.replace(self.dn,newdn) > > These are the values in my example: > subolddn: uid=user_test_h80,ou=TEST_H81,BASE > self.dn: ou=test_h81,BASE > newdn: OU=TEST_H81,ou=test_h82,BASE > > I'm currently unsure why this works via UDM CLI. It works via UDM CLI because it uses always the same upper and lower case. If it comes from the external lib for example the ldap base is not always the same. There are more errors in this area, for example the rename from lower to upper case. It is allowed in AD / S4 but not in OpenLDAP. For this a move to a temporary folder would be the best. It should also be possible to rename a cn / ou from upper to lowercase and vice versa. I've added some test cases: - 52_s4connector/189sync_ad_rename_container - 52_s4connector/199sync_ad_move_ou_casemix - 52_s4connector/199sync_ad_rename_ou - 63_udm-containers/06_container_ou_rename - 63_udm-containers/07_container_ou_rename_uppercase - 63_udm-containers/08_container_ou_rename_uppercase_rollback - 63_udm-containers/16_container_cn_rename - 63_udm-containers/17_container_cn_rename_uppercase - 63_udm-containers/18_container_cn_rename_uppercase_rollback Code changes: r46320 + r46326 + r46437 + r46440 YAML: 2013-11-26-univention-directory-manager-modules.yaml (In reply to Stefan Gohmann from comment #7) > I've added some test cases: > - 63_udm-containers/06_container_ou_rename > - 63_udm-containers/07_container_ou_rename_uppercase > - 63_udm-containers/08_container_ou_rename_uppercase_rollback > - 63_udm-containers/16_container_cn_rename > - 63_udm-containers/17_container_cn_rename_uppercase > - 63_udm-containers/18_container_cn_rename_uppercase_rollback I added/extended the tests and now they fail: * Renaming a subcontainer of a container fails if it is just uppercase change * Renaming an empty container leaves a stall "temporary_move_container_*" OK, theses issues have been fixed: r46598 Code: unused: new_position = ','.join(ldap.explode_dn(newdn)[1:]) try/finally around the last (big) part of move()? self._delete_temporary_ou_if_empty('%s,%s' %(temp_container,self.lo.base)) return value: move returns whatever self._move() returns normally. But not in the new subtree_moving part. _move() returns None, though, I do not know if ignoring the return value is an issue. Test: FAIL when using up/mixed case objects in subtree, e.g. uid=Administrator (In reply to Dirk Wiesenthal from comment #10) > Code: > unused: > new_position = ','.join(ldap.explode_dn(newdn)[1:]) removed > try/finally around the last (big) part of move()? > self._delete_temporary_ou_if_empty('%s,%s' > %(temp_container,self.lo.base)) I don't think it makes the code more readable. I moved it into a single function. > return value: > move returns whatever self._move() returns normally. But not in the new > subtree_moving part. _move() returns None, though, I do not know if ignoring > the return value is an issue. I have preserved the previous behavior. We shouldn't change it in this bug scope. > Test: > FAIL when using up/mixed case objects in subtree, e.g. uid=Administrator Yes, fixed with r46616 + r46619 Code works Tests passed YAML ok The error described here (different cases in containers) should be fixed by now. I opened Bug#33725 for the same problem in users, computers, groups (but this is a different mechanism). *** Bug 33567 has been marked as a duplicate of this bug. *** |