Univention Bugzilla – Full Text Bug Listing |
Summary: | Handler module is not called if an object is moved to a non-readable position | ||
---|---|---|---|
Product: | UCS | Reporter: | Stefan Gohmann <gohmann> |
Component: | Listener (univention-directory-listener) | Assignee: | Philipp Hahn <hahn> |
Status: | CLOSED FIXED | QA Contact: | Arvid Requate <requate> |
Severity: | normal | ||
Priority: | P5 | CC: | hahn, markus.daehlmann, requate, schwardt |
Version: | UCS 4.1 | Flags: | hahn:
Patch_Available+
|
Target Milestone: | UCS 4.1-3-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
What kind of report is it?: | Bug Report | What type of bug is this?: | 7: Crash: Bug causes crash or data loss |
Who will be affected by this bug?: | 3: Will affect average number of installed domains | How will those affected feel about the bug?: | 3: A User would likely not purchase the product |
User Pain: | 0.360 | Enterprise Customer affected?: | Yes |
School Customer affected?: | Yes | ISV affected?: | |
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2016080221000449 | Bug group (optional): | |
Max CVSS v3 score: | |||
Bug Depends on: | |||
Bug Blocks: | 42616, 42547 |
Description
Stefan Gohmann
2016-08-18 15:53:58 CEST
1. In the rename-case the old cache is copied in line 725, but change_delete_dn() does a 2nd cache lookup on its own based on the new location, where (must likely) no entry is found. cache_get_entry_lower_upper() then returns an empty cache entry, for which no handlers are registered. handlers_delete() then only calls the replication module, as it is hard-coded and will print the "skipped" message for all other handlers. As we already have fetched the cache entry, call handlers_delete() directly passing the copied cache. 2. The week before Arvid and I debugged a case, were the handlers were called twice when the LDAP search by UUID did not return a result. Change that to retry the search by DN first and only then do the deletion if both searches returned nothing. Untested patch: compiles and should fix the bug, but not tested. diff --git a/branches/ucs-4.1/ucs-4.1-2/management/univention-directory-listener/src/change.c b/branches/ucs-4.1/ucs-4.1-2/management/univention-directory-listener/src/change.c index ae1c566..e1cbfdc 100644 --- a/branches/ucs-4.1/ucs-4.1-2/management/univention-directory-listener/src/change.c +++ b/branches/ucs-4.1/ucs-4.1-2/management/univention-directory-listener/src/change.c @@ -771,12 +771,14 @@ retry_dn: } ldap_msgfree(res); if (delete) { - // FIXME: trans->cur.notify.command = 'd' // to overwrite 'r' without 'a' - rv = change_delete_dn(trans->cur.notify.id, trans->cur.notify.dn, trans->cur.notify.command); if (uuid) { uuid = NULL; goto retry_dn; } + // FIXME: trans->cur.notify.command = 'd' // to overwrite 'r' without 'a' + signals_block(); + rv = handlers_delete(trans->cur.notify.dn, &trans->cur.cache, trans->cur.notify.command); + signals_unblock(); } out: r71776 | Bug #42029 Listener: Fix deletion of ACLed entries r71775 | Bug #42029 Listener: Call handle once for deleted objects r71774 | Bug #42029 Listener: Fix unit test Package: univention-directory-listener Version: 10.0.0-15.327.201608221002 Branch: ucs_4.1-0 Scope: errata4.1-3 r71782 | Bug #42029 Listener: Fix deletion of ACLed entries YAML univention-directory-listener.yaml r71779 | Bug #42029 Listener: Fix deletion of ACLed entries r71778 | Bug #42029 Listener: Call handle once for deleted objects r71777 | Bug #42029 Listener: Fix unit test Code review: Ok * r71776 implements point 1 of Comment 1 and r71775 implements point 2. Patches merged to ucs-4.2-0 Test: Ok Advisory: Ok, only for errata4.1-3, not for errata4.1-2 |