Bug 43396 - Traceback: containers/cn.pathKeys not initialized
Traceback: containers/cn.pathKeys not initialized
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Johannes Keiser
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-23 12:24 CET by Philipp Hahn
Modified: 2017-07-05 13:06 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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?:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments
Make PATHS static - modified nowhere and no need to give each instance a copy (9.83 KB, patch)
2017-01-23 12:24 CET, Philipp Hahn
Details | Diff
patch (1.62 KB, patch)
2017-07-03 16:08 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2017-01-23 12:24:05 CET
Created attachment 8367 [details]
Make PATHS static - modified nowhere and no need to give each instance a copy

import univention.admin.uldap as l
import univention.admin.handlers.container.cn as cn
lo, po = l.getAdminConnection()
o = cn.object(None, lo, po)
# o.open() is missing here (by accident)
o['name'] = 'test'
o.create()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 306, in create
    return self._create()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 761, in _create
    self._ldap_post_create()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/container/cn.py", line 238, in _ldap_post_create
    for i in range(0, len(self.pathKeys)):
AttributeError: 'object' object has no attribute 'pathKeys'
Comment 1 Johannes Keiser univentionstaff 2017-07-03 15:30:54 CEST
(In reply to Philipp Hahn from comment #0)
> Created attachment 8367 [details]
> Make PATHS static - modified nowhere and no need to give each instance a copy
> 
> import univention.admin.uldap as l
> import univention.admin.handlers.container.cn as cn
> lo, po = l.getAdminConnection()
> o = cn.object(None, lo, po)
> # o.open() is missing here (by accident)
> o['name'] = 'test'
> o.create()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py",
> line 306, in create
>     return self._create()
>   File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py",
> line 761, in _create
>     self._ldap_post_create()
>   File
> "/usr/lib/pymodules/python2.7/univention/admin/handlers/container/cn.py",
> line 238, in _ldap_post_create
>     for i in range(0, len(self.pathKeys)):
> AttributeError: 'object' object has no attribute 'pathKeys'

Applied patch:

r 80788
univention-directory-manager-modules (12.0.17-51) 
* Bug #43396: Applied patch from Philipp Hahn - Make PATHS static

YAML: r 80790
Comment 2 Florian Best univentionstaff 2017-07-03 16:08:57 CEST
Created attachment 8992 [details]
patch
Comment 3 Florian Best univentionstaff 2017-07-03 16:09:53 CEST
REOPEN: the patch introduced an error in the detection of the currently set default containers. Attached a fix for this.
Comment 4 Johannes Keiser univentionstaff 2017-07-03 16:52:22 CEST
(In reply to Florian Best from comment #2)
> Created attachment 8992 [details]
> patch

Applied patch:

r 80793
univention-directory-manager-modules (12.0.17-52) 
* Bug #43396: Applied additional patch from Florian Best - Make PATHS static
Comment 5 Florian Best univentionstaff 2017-07-03 17:03:02 CEST
OK: container/ou
OK: container/cn
OK: create
OK: removal
OK: modify
Comment 6 Janek Walkenhorst univentionstaff 2017-07-05 13:06:35 CEST
<http://errata.software-univention.de/ucs/4.2/79.html>